From 61675716c4597aabe0c590d63e845dbb12e47e91 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 4 Sep 2014 14:53:41 -0700 Subject: [PATCH] Remove references to old volume from fstab On HP Cloud, /dev/vdb winds up in fstab, which leads us to having dupliate entries for /mnt. Change-Id: I2c0914fdcf149cd823d4c9833a6e21d2bca8a6e7 --- make_swap.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/make_swap.sh b/make_swap.sh index 8dcc419a17..33830a977b 100644 --- a/make_swap.sh +++ b/make_swap.sh @@ -14,7 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. - # If we're running on a cloud server with no swap, fix that: if [ `grep SwapTotal /proc/meminfo | awk '{ print $2; }'` -eq 0 ]; then if [ -b /dev/vdb ]; then @@ -37,9 +36,9 @@ if [ `grep SwapTotal /proc/meminfo | awk '{ print $2; }'` -eq 0 ]; then mount ${DEV}2 /mnt rsync -a /opt/ /mnt/ umount /mnt + perl -nle "m,${DEV}, || print" -i /etc/fstab echo "${DEV}1 none swap sw 0 0" >> /etc/fstab echo "${DEV}2 /opt ext4 errors=remount-ro,barrier=0 0 2" >> /etc/fstab mount -a fi fi -