From a6979ab2ef49d833f0be6c39f54e36c30d7d6a4b Mon Sep 17 00:00:00 2001 From: André Erdmann Date: Mon, 2 Mar 2015 21:08:32 +0100 Subject: functions.sh, rescueshell: use cttyhack if available This allows to bypass the hardcoded shell on /dev/tty1 if console= is not given on the cmdline. --- sourceroot/functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sourceroot/functions.sh b/sourceroot/functions.sh index 79ce366..fff79cf 100755 --- a/sourceroot/functions.sh +++ b/sourceroot/functions.sh @@ -53,6 +53,8 @@ rescueshell() { ewarn "If you wish resume booting process, run 'resume-boot'." if [ "$console" ] && [ -c "/dev/${console}" ]; then setsid sh -c "exec sh --login /dev/${console} 2>&1" + elif command -v cttyhack 1>/dev/null 2>&1; then + setsid cttyhack sh --login elif [ -c '/dev/tty1' ]; then setsid sh -c 'exec sh --login /dev/tty1 2>&1' else -- cgit v1.2.3-59-g8ed1b