[Lxc-users] [PATCH] Set the utsname on the debian template

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Sep 7 10:00:08 UTC 2011


From: Tzafrir Cohen <tzafrir at cohens.org.il>

Signed-off-by: Tzafrir Cohen <tzafrir at cohens.org.il>
---
 templates/lxc-debian.in |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index 75a33a4..9d33113 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -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
-- 
1.7.5.4





More information about the lxc-users mailing list