aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Bilyk <jbilyk@gmail.com>2011-07-16 22:01:44 -0400
committerJeff Bilyk <jbilyk@gmail.com>2011-07-16 22:01:44 -0400
commita234ec98b8a4be9fa7ebd8e37cce4d58ec1c5473 (patch)
treebe2222efe2e02c32b74da365e525bd57d0d4ca68
parentc67ff2550962e8857d9a7c3859fc5003324e418a (diff)
downloadalpine-conf-a234ec98b8a4be9fa7ebd8e37cce4d58ec1c5473.tar.bz2
alpine-conf-a234ec98b8a4be9fa7ebd8e37cce4d58ec1c5473.tar.xz
setup-bootable: somehow a couple lines for remounting RO/RW got missed
-rw-r--r--setup-bootable.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup-bootable.in b/setup-bootable.in
index 8026226..db388a6 100644
--- a/setup-bootable.in
+++ b/setup-bootable.in
@@ -117,7 +117,10 @@ elif [ -b "$dest" ]; then
fi
# Check for RO mounting
-if [ "`grep \"$destdir\" /proc/mount | grep '(ro,'`"
+if [ "`grep \"$destdir\" /proc/mount | grep '(ro,'`" == "ro" ]; then
+ remountneeded="Y"
+ mount -o remount,rw "$destdir"
+fi
[ -n "$verbose" ] && echo "Using $dest as target (mounted on $destdir)"
@@ -258,5 +261,9 @@ else
echo "Warning: Could not find the parent device for $dest"
fi
+if [ "$remountneeded" == "Y" ]; then
+ mount -o remount,ro "$destdir"
+fi
+
cleanup
sync