From 7b45621175cebb8ad2a59901e26593811047e818 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 25 Jan 1999 14:21:56 +0000 Subject: Perform quota checking on file systems after they are marked read/write (#719). --- rc.d/rc.sysinit | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 72d92663..acd2b5fa 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -60,9 +60,6 @@ if [ ! -f /fastboot ]; then mount -n -o remount,ro / echo "Automatic reboot in progress." reboot - elif [ "$rc" = "1" -a -x /sbin/quotacheck ]; then - echo "Checking root filesystem quotas" - /sbin/quotacheck -v / fi fi @@ -94,6 +91,12 @@ fi echo "Remounting root filesystem in read-write mode." mount -n -o remount,rw / +# Check quotas if fsck fixed something. +if [ "$rc" = "1" -a -x /sbin/quotacheck ]; then + echo "Checking root filesystem quotas" + /sbin/quotacheck -v / +fi + if [ ! -f /etc/HOSTNAME ]; then echo ${HOSTNAME} > /etc/HOSTNAME fi @@ -211,9 +214,6 @@ if [ ! -f /fastboot ]; then mount -n -o remount,ro / echo "Automatic reboot in progress." reboot - elif [ "$rc" = "1" -a -x /sbin/quotacheck ]; then - echo "Checking filesystem quotas" - /sbin/quotacheck -v -R -a fi fi @@ -228,6 +228,12 @@ if [ -x /sbin/setsysfont ]; then /sbin/setsysfont fi +# Check quotas if fsck fixed something. +if [ "$rc" = "1" -a -x /sbin/quotacheck ]; then + echo "Checking filesystem quotas" + /sbin/quotacheck -v -R -a +fi + if [ -x /sbin/quotaon ]; then echo "Turning on user and group quotas for local filesystems" /sbin/quotaon -a @@ -329,4 +335,7 @@ fi dmesg > /var/log/dmesg # Feed entropy into the entropy pool +# XXX Random is also started as S20random but randomization may be needed +# XXX for packet sequence numbers during network initialization so we'll +# XXX add entropy here too. /etc/rc.d/init.d/random start -- cgit v1.2.1