summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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