From f7783ed33c230fc5d14d77bb8f764c80d04b10cd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 14 Mar 2005 17:42:46 +0000 Subject: backport fsck auto-reboot fix (#151046) --- 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 ef206e79..26dd0c41 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -266,9 +266,15 @@ if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" ]; then elif [ "$rc" = "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 @@ -528,9 +534,15 @@ if [ -z "$fastboot" ]; then elif [ "$rc" = "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