Commit 1c43a3be by Serge Hallyn Committed by Stéphane Graber

ubuntu templates: don't check for $rootfs/run/shm

/dev/shm must be turned from a directory into a symlink to /run/shm. The templates do this only if they find -d $rootfs/run/shm. Since /run will be a tmpfs, checking for it in the rootfs is silly. It also is currently broken as ubuntu cloud images have an empty /run. (this should fix https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1353734) Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent cb69d6e6
...@@ -122,7 +122,7 @@ EOF ...@@ -122,7 +122,7 @@ EOF
# get bind mounted to the host's /run/shm. So try to rmdir # get bind mounted to the host's /run/shm. So try to rmdir
# it, and in case that fails move it out of the way. # it, and in case that fails move it out of the way.
# NOTE: This can only be removed once 12.04 goes out of support # NOTE: This can only be removed once 12.04 goes out of support
if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then if [ ! -L $rootfs/dev/shm ] && [ -e $rootfs/dev/shm ]; then
rmdir $rootfs/dev/shm 2>/dev/null || mv $rootfs/dev/shm $rootfs/dev/shm.bak rmdir $rootfs/dev/shm 2>/dev/null || mv $rootfs/dev/shm $rootfs/dev/shm.bak
ln -s /run/shm $rootfs/dev/shm ln -s /run/shm $rootfs/dev/shm
fi fi
......
...@@ -577,7 +577,7 @@ EOF ...@@ -577,7 +577,7 @@ EOF
# get bind mounted to the host's /run/shm. So try to rmdir # get bind mounted to the host's /run/shm. So try to rmdir
# it, and in case that fails move it out of the way. # it, and in case that fails move it out of the way.
# NOTE: This can only be removed once 12.04 goes out of support # NOTE: This can only be removed once 12.04 goes out of support
if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then if [ ! -L $rootfs/dev/shm ] && [ -e $rootfs/dev/shm ]; then
rmdir $rootfs/dev/shm 2>/dev/null || mv $rootfs/dev/shm $rootfs/dev/shm.bak rmdir $rootfs/dev/shm 2>/dev/null || mv $rootfs/dev/shm $rootfs/dev/shm.bak
ln -s /run/shm $rootfs/dev/shm ln -s /run/shm $rootfs/dev/shm
fi fi
......
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