Skip to content

Commit

Permalink
centos: Fix booting a Centos 6 container
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
stgraber committed Jan 29, 2015
1 parent a4aed37 commit dbe92cf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templates/lxc-centos.in
Expand Up @@ -264,7 +264,6 @@ EOF
# set minimal fstab
cat <<EOF > $rootfs_path/etc/fstab
/dev/root / rootfs defaults 0 0
none /dev/shm tmpfs nosuid,nodev 0 0
EOF

# create lxc compatibility init script
Expand All @@ -274,14 +273,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
Expand Down

0 comments on commit dbe92cf

Please sign in to comment.