use "openvt" for emergency shell

master
Harald Hoyer 2012-02-07 19:19:55 +01:00
parent 5ccc88a742
commit 59feafc6c7
3 changed files with 5 additions and 1 deletions

View 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 "

View File

@ -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

View File

@ -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