aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-08-19 04:37:46 +0000
committerBill Nottingham <notting@redhat.com>2004-08-19 04:37:46 +0000
commit43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca (patch)
treea51b4e795cf4745183684cb809ef8c7ac41bb1d1
parenta1b804ebbbf9cfa1edbfa01c98b31c96519c4a29 (diff)
downloadinitscripts-43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca.tar
initscripts-43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca.tar.gz
initscripts-43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca.tar.bz2
initscripts-43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca.tar.xz
initscripts-43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca.zip
readonly root updates (#129893, <markmc@redhat.com>)
-rwxr-xr-xrc.d/rc.sysinit15
1 files changed, 9 insertions, 6 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 0baa7ef5..a22c18bb 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -276,15 +276,18 @@ else
fsckoptions="-V $fsckoptions"
fi
-if [ -f /etc/rc.readonly ]; then
- # Call rc.readonly to set up magic stuff needed for readonly root
- . /etc/rc.readonly
- READONLY=1
+if [ -f /etc/sysconfig/readonly-root ]; then
+ . /etc/sysconfig/readonly-root
+
+ if [ "$READONLY" = "yes" ]; then
+ # Call rc.readonly to set up magic stuff needed for readonly root
+ . /etc/rc.readonly
+ fi
fi
_RUN_QUOTACHECK=0
ROOTFSTYPE=`awk '/ \/ / && ($3 !~ /rootfs/) { print $3 }' /proc/mounts`
-if [ -z "$fastboot" -a -z "$READONLY" -a "X$ROOTFSTYPE" != "Xnfs" -a "X$ROOTFSTYPE" != "Xnfs4" ]; then
+if [ -z "$fastboot" -a "$READONLY" != "yes" -a "X$ROOTFSTYPE" != "Xnfs" -a "X$ROOTFSTYPE" != "Xnfs4" ]; then
STRING=$"Checking root filesystem"
echo $STRING
@@ -378,7 +381,7 @@ fi
# Remount the root filesystem read-write.
update_boot_stage RCmountfs
state=`awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts`
-[ "$state" != "rw" -a -z "$READONLY" ] && \
+[ "$state" != "rw" -a "$READONLY" != "yes" ] && \
action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw /
# LVM2 initialization