centos: Fix booting a Centos 6 container

parent a4aed378
...@@ -264,7 +264,6 @@ EOF ...@@ -264,7 +264,6 @@ EOF
# set minimal fstab # set minimal fstab
cat <<EOF > $rootfs_path/etc/fstab cat <<EOF > $rootfs_path/etc/fstab
/dev/root / rootfs defaults 0 0 /dev/root / rootfs defaults 0 0
none /dev/shm tmpfs nosuid,nodev 0 0
EOF EOF
# create lxc compatibility init script # create lxc compatibility init script
...@@ -274,14 +273,19 @@ start on startup ...@@ -274,14 +273,19 @@ start on startup
env container env container
pre-start script pre-start script
if [ "x$container" != "xlxc" -a "x$container" != "xlibvirt" ]; then if [ "x\$container" != "xlxc" -a "x\$container" != "xlibvirt" ]; then
stop; stop;
fi fi
initctl start tty TTY=console
rm -f /var/lock/subsys/* rm -f /var/lock/subsys/*
rm -f /var/run/*.pid 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 telinit 3
exit 0; exit 0
end script end script
EOF EOF
elif [ "$release" = "5" ]; then elif [ "$release" = "5" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment