aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-12-12 07:55:10 +0000
committerBill Nottingham <notting@redhat.com>2000-12-12 07:55:10 +0000
commit99bea6c770fed16154ee3ab7dfd2929af3d68e56 (patch)
treedd0b75c0c8c011899480515866ef5121401ab598
parentf29c352a905cc0867eb0198eacc7734fd651e525 (diff)
downloadinitscripts-99bea6c770fed16154ee3ab7dfd2929af3d68e56.tar
initscripts-99bea6c770fed16154ee3ab7dfd2929af3d68e56.tar.gz
initscripts-99bea6c770fed16154ee3ab7dfd2929af3d68e56.tar.bz2
initscripts-99bea6c770fed16154ee3ab7dfd2929af3d68e56.tar.xz
initscripts-99bea6c770fed16154ee3ab7dfd2929af3d68e56.zip
don't remount r/w if it is r/w (#12097)
-rwxr-xr-xrc.d/rc.sysinit4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index ce58b139..103471c5 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -254,7 +254,9 @@ if [ -x /sbin/isapnp -a -f /etc/isapnp.conf ]; then
fi
# Remount the root filesystem read-write.
-action "Remounting root filesystem in read-write mode: " mount -n -o remount,rw /
+state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
+[ "$state" != "rw" ] && \
+ action "Remounting root filesystem in read-write mode: " mount -n -o remount,rw /
# Clear mtab
>/etc/mtab