From: Harald Hoyer Date: Tue, 7 Feb 2012 18:19:55 +0000 (+0100) Subject: use "openvt" for emergency shell X-Git-Tag: 015~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59feafc6c7e3f02ce0584871b179a41b28844654;p=thirdparty%2Fdracut.git use "openvt" for emergency shell --- diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example index 92dd96716..45063c66a 100644 --- a/dracut.conf.d/fedora.conf.example +++ b/dracut.conf.d/fedora.conf.example @@ -7,4 +7,4 @@ omit_dracutmodules+=" dash " stdloglvl=3 prefix=/run/initramfs realinitpath="/usr/lib/systemd/systemd" -install_items+=" vi /etc/virc ps grep cat rm " +install_items+=" vi /etc/virc ps grep cat rm openvt " diff --git a/modules.d/99base/init b/modules.d/99base/init index f8d52f70d..9e189da03 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -64,6 +64,8 @@ emergency_shell() _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}" [ -c "$_ctty" ] || _ctty=/dev/tty1 setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1 + elif [ -n "$(command -v openvt)" ] && ! getarg "console=" >/dev/null 2>&1 && getargbool 1 "rd.openvt" ; then + openvt -f -c 1 -w -s -l -- sh else sh -i -l 0<$_ctty 1>$_ctty 2>&1 fi diff --git a/modules.d/99shutdown/shutdown b/modules.d/99shutdown/shutdown index 019a451a9..64937fa70 100755 --- a/modules.d/99shutdown/shutdown +++ b/modules.d/99shutdown/shutdown @@ -36,6 +36,8 @@ emergency_shell() _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}" [ -c "$_ctty" ] || _ctty=/dev/tty1 setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1 + elif [ -n "$(command -v openvt)" ] && ! getarg "console=" >/dev/null 2>&1 && getargbool 1 "rd.openvt" ; then + openvt -f -c 1 -w -s -l -- sh else sh -i -l 0<$_ctty 1>$_ctty 2>&1 fi