]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Set the utsname on the debian template
authorTzafrir Cohen <tzafrir@cohens.org.il>
Tue, 13 Sep 2011 13:08:04 +0000 (15:08 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 13 Sep 2011 13:08:04 +0000 (15:08 +0200)
Signed-off-by: Tzafrir Cohen <tzafrir@cohens.org.il>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
templates/lxc-debian.in

index 75a33a4064c877be59573e0fd8be9e833e7cbc12..9d331139e589be2eef01d7f0dd5d6a2ab0355339 100644 (file)
@@ -186,12 +186,13 @@ copy_configuration()
 {
     path=$1
     rootfs=$2
-    name=$3
+    hostname=$3
 
     cat <<EOF >> $path/config
 lxc.tty = 4
 lxc.pts = 1024
 lxc.rootfs = $rootfs
+lxc.utsname = $hostname
 lxc.cgroup.devices.deny = a
 # /dev/null and zero
 lxc.cgroup.devices.allow = c 1:3 rwm
@@ -307,7 +308,7 @@ if [ $? -ne 0 ]; then
     exit 1
 fi
 
-copy_configuration $path $rootfs
+copy_configuration $path $rootfs $name
 if [ $? -ne 0 ]; then
     echo "failed write configuration file"
     exit 1