[lxc-devel] [PATCH] lxc-oracle: set hostname with systemd

Stéphane Graber stgraber at ubuntu.com
Tue May 20 14:47:25 UTC 2014


On Tue, May 20, 2014 at 10:33:30AM -0400, Dwight Engen wrote:
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  templates/lxc-oracle.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in
> index 2fa289b..8a8c821 100644
> --- a/templates/lxc-oracle.in
> +++ b/templates/lxc-oracle.in
> @@ -340,6 +340,10 @@ TYPE=Ethernet
>  EOF
>  
>      # set the hostname
> +    if [ $container_release_major -ge "7" ]; then
> +        # systemd honors /etc/hostname
> +        echo "$name" >$container_rootfs/etc/hostname
> +    fi
>      cat <<EOF > $container_rootfs/etc/sysconfig/network
>  NETWORKING=yes
>  NETWORKING_IPV6=no
> -- 
> 1.9.0
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140520/5397e788/attachment.sig>


More information about the lxc-devel mailing list