]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
use "openvt" for emergency shell
authorHarald Hoyer <harald@redhat.com>
Tue, 7 Feb 2012 18:19:55 +0000 (19:19 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 7 Feb 2012 18:44:03 +0000 (19:44 +0100)
dracut.conf.d/fedora.conf.example
modules.d/99base/init
modules.d/99shutdown/shutdown

index 92dd9671628ac568bdba5b1553fdd97b81a91246..45063c66a1bedd9c297aaba30f9c8cefec920f0b 100644 (file)
@@ -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 "
index f8d52f70d811428e65d88dd59626bc16ec7a64e9..9e189da03788b06b9fc4fbc34307f042f7030d35 100755 (executable)
@@ -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
index 019a451a9413032236941aed73a2e2b4595250dc..64937fa7083ce7d5b79a304d016be81f915dd916 100755 (executable)
@@ -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