Commit 5ff33774 by Stéphane Graber

ubuntu: Actually attempt to remove /dev/shm

parent a6daed42
...@@ -139,8 +139,9 @@ EOF ...@@ -139,8 +139,9 @@ EOF
# I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did # I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did
# 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
if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then
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
......
...@@ -541,8 +541,9 @@ EOF ...@@ -541,8 +541,9 @@ EOF
# I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did # I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did
# 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
if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then
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