aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrc.d/rc.sysinit11
-rw-r--r--sysconfig.txt4
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: