From 7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 17 Oct 2004 04:51:00 +0000 Subject: automatically reboot when fsck calls for it, instead of requiring manual intervention (#117641 and duplicates) --- rc.d/rc.sysinit | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index b3f7a26d..0613d0d3 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -396,9 +396,15 @@ if [ -z "$fastboot" -a "$READONLY" != "yes" -a "X$ROOTFSTYPE" != "Xnfs" -a "X$RO elif [ "$rc" -eq "1" ]; then passed "$STRING" echo + elif [ "$rc" -eq "2" -o "$rc" -eq "3" ]; then + echo $"Unmounting file systems" + umount -a + mount -n -o remount,ro / + echo $"Automatic reboot in progress." + reboot -f fi - # A return of 2 or higher means there were serious problems. + # A return of 4 or higher means there were serious problems. if [ $rc -gt 1 ]; then if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then chvt 1 @@ -652,9 +658,15 @@ if [ -z "$fastboot" ]; then elif [ "$rc" -eq "1" ]; then passed "$STRING" echo + elif [ "$rc" -eq "2" -o "$rc" -eq "3" ]; then + echo $"Unmounting file systems" + umount -a + mount -n -o remount,ro / + echo $"Automatic reboot in progress." + reboot -f fi - # A return of 2 or higher means there were serious problems. + # A return of 4 or higher means there were serious problems. if [ $rc -gt 1 ]; then if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then chvt 1 -- cgit v1.2.1