aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-10-17 04:51:00 +0000
committerBill Nottingham <notting@redhat.com>2004-10-17 04:51:00 +0000
commit7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3 (patch)
treefe06c00e3b283ce8f48bc87d4e0348e75b6d3034
parentb380aae09c1d64020890d4593a0b1646693be118 (diff)
downloadinitscripts-7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3.tar
initscripts-7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3.tar.gz
initscripts-7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3.tar.bz2
initscripts-7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3.tar.xz
initscripts-7ca3899ae0afc0a7eba6cbf5d3003d3953e34ec3.zip
automatically reboot when fsck calls for it, instead of requiring manual intervention (#117641 and duplicates)
-rwxr-xr-xrc.d/rc.sysinit16
1 files 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