Quoting Jiri Slaby (jsl...@suse.cz):
> From: Frederic Crozat <fcro...@suse.com>
> 
> - create /etc/hostname as symlink to /etc/HOSTNAME
> - fix inadequate space in lxc.mount config, preventing lxc-clone to work
> 
> Jiri Slaby: some cleanups

Acked-by: Serge E. Hallyn <serge.hal...@ubuntu.com>

> ---
>  templates/lxc-opensuse.in | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
> index 65fb7b0..f69eae1 100644
> --- a/templates/lxc-opensuse.in
> +++ b/templates/lxc-opensuse.in
> @@ -34,8 +34,8 @@ configure_opensuse()
>  
>     # set network as static, but everything is done by LXC outside the 
> container
>     cat <<EOF > $rootfs/etc/sysconfig/network/ifcfg-eth0
> -STARTMODE='auto'
> -BOOTPROTO='static'
> +STARTMODE='manual'
> +BOOTPROTO='none'
>  EOF
>  
>     # set default route
> @@ -71,6 +71,8 @@ EOF
>      cat <<EOF > $rootfs/etc/HOSTNAME
>  $hostname
>  EOF
> +    # ensure /etc/hostname is available too
> +    ln -s -f HOSTNAME $rootfs/etc/hostname
>  
>      # do not use hostname from HOSTNAME variable
>      cat <<EOF >> $rootfs/etc/sysconfig/cron
> @@ -253,6 +255,9 @@ copy_configuration()
>      rootfs=$2
>      name=$3
>  
> +    # only disable network if no network configuration was passed
> +    grep -q "^lxc.network.type" $path/config || echo 'lxc.network.type = 
> empty' >> $path/config
> +
>      grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = 
> $rootfs" >> $path/config
>      cat <<EOF >> $path/config
>  lxc.utsname = $name
> -- 
> 1.8.1.2
> 
> 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to