summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0/checkroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packages/initscripts/initscripts-1.0/checkroot.sh')
-rwxr-xr-xpackages/initscripts/initscripts-1.0/checkroot.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/initscripts/initscripts-1.0/checkroot.sh b/packages/initscripts/initscripts-1.0/checkroot.sh
index 8255038c32..0283e1acca 100755
--- a/packages/initscripts/initscripts-1.0/checkroot.sh
+++ b/packages/initscripts/initscripts-1.0/checkroot.sh
@@ -148,7 +148,12 @@ fi
# remount the rootfs rw but do not try to change mtab because it
# is on a ro fs until the remount succeeded. Then clean up old mtabs
# and finally write the new mtab.
+# This part is only needed if the rootfs was mounted ro.
#
+if [ $(grep rootfs /proc/mounts | awk '{print $4}') = rw ]; then
+ exit 0
+fi
+echo "Remounting root file system..."
mount -n -o remount,$rootmode /
if test "$rootmode" = rw
then