From: Stéphane Graber Date: Thu, 29 Jan 2015 21:59:58 +0000 (+0100) Subject: centos: Fix booting a Centos 6 container X-Git-Tag: lxc-1.1.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a79df22733c48898aaeb600cc073278236d4b489;p=thirdparty%2Flxc.git centos: Fix booting a Centos 6 container Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index 4696ce37e..dd9b25424 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -270,7 +270,6 @@ EOF # set minimal fstab cat < $rootfs_path/etc/fstab /dev/root / rootfs defaults 0 0 -none /dev/shm tmpfs nosuid,nodev 0 0 EOF # create lxc compatibility init script @@ -280,14 +279,19 @@ start on startup env container pre-start script - if [ "x$container" != "xlxc" -a "x$container" != "xlibvirt" ]; then + if [ "x\$container" != "xlxc" -a "x\$container" != "xlibvirt" ]; then stop; fi - initctl start tty TTY=console + rm -f /var/lock/subsys/* rm -f /var/run/*.pid + [ -e /etc/mtab ] || ln -s /proc/mounts /etc/mtab + mkdir -p /dev/shm + mount -t tmpfs -o nosuid,nodev tmpfs /dev/shm + + initctl start tty TTY=console telinit 3 - exit 0; + exit 0 end script EOF elif [ "$release" = "5" ]; then