diff options
author | Bill Nottingham <notting@redhat.com> | 2006-09-08 19:16:45 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2006-09-08 19:16:45 +0000 |
commit | b7cd7cb77140e371effd215f5a07b214f7f03bfc (patch) | |
tree | 9db29e176dac7cfaa05b01583abcd4de3a0321d3 | |
parent | 9c413f9d490260bbbcc60a6ad5592e16ebf66521 (diff) | |
download | initscripts-b7cd7cb77140e371effd215f5a07b214f7f03bfc.tar initscripts-b7cd7cb77140e371effd215f5a07b214f7f03bfc.tar.gz initscripts-b7cd7cb77140e371effd215f5a07b214f7f03bfc.tar.bz2 initscripts-b7cd7cb77140e371effd215f5a07b214f7f03bfc.tar.xz initscripts-b7cd7cb77140e371effd215f5a07b214f7f03bfc.zip |
allow going to a shell if the system is shut down uncleanly
-rwxr-xr-x | rc.d/rc.sysinit | 11 | ||||
-rw-r--r-- | sysconfig.txt | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 5ff23530..fb850618 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -344,7 +344,7 @@ fi update_boot_stage RCkernelparam sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1 -if [ "$CONSOLETYPE" = "vt" -a -x /bin/loadkeys ]; then +if [ -x /bin/loadkeys ]; then KEYTABLE= KEYMAP= if [ -f /etc/sysconfig/console/default.kmap ]; then @@ -447,6 +447,15 @@ elif [ -f /.autofsck ]; then if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then AUTOFSCK_OPT="$AUTOFSCK_OPT -f" fi + if [ -n "$AUTOFSCK_SINGLEUSER" ]; then + echo + echo $"*** Warning -- the system did not shut down cleanly. " + echo $"*** Dropping you to a shell; the system will continue" + echo $"*** when you leave the shell." + [ -n "$SELINUX_STATE" ] && echo "0" > $selinuxfs/enforce + sulogin + [ -n "$SELINUX_STATE" ] && echo "1" > $selinuxfs/enforce + fi fsckoptions="$AUTOFSCK_OPT $fsckoptions" fi diff --git a/sysconfig.txt b/sysconfig.txt index 04faaff5..a191b664 100644 --- a/sysconfig.txt +++ b/sysconfig.txt @@ -41,10 +41,10 @@ Files in /etc/sysconfig does not normally exist; if it does, it can influence a choice whether or not to fsck after a crash - AUTOFSCK_TIMEOUT=5 - Number of seconds to wait for console user to make a choice AUTOFSCK_DEF_CHECK=no If the user does not respond, choose whether or not to fsck + AUTOFSCK_SINGLEUSER= + If this is set, drop to single user mode before fsck. /etc/sysconfig/clock: |