From 43b7ec8a3e6ac548bf2a74c176ce3aa0ffa81bca Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 19 Aug 2004 04:37:46 +0000 Subject: readonly root updates (#129893, ) --- rc.d/rc.sysinit | 15 +++++++++------ 1 file 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 -- cgit v1.2.1