diff options
author | André Erdmann <dywi@mailerd.de> | 2015-03-02 21:08:32 +0100 |
---|---|---|
committer | Andre Erdmann <dywi@mailerd.de> | 2019-04-27 18:43:56 +0200 |
commit | a6979ab2ef49d833f0be6c39f54e36c30d7d6a4b (patch) | |
tree | 4a7b14350a40fef8a04fb8e4f57198a27b1bd2eb | |
parent | functions.sh: "<cmd> $(eval echo...)" => "eval <cmd>" (diff) | |
download | better-initramfs-a6979ab2ef49d833f0be6c39f54e36c30d7d6a4b.tar.xz better-initramfs-a6979ab2ef49d833f0be6c39f54e36c30d7d6a4b.zip |
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.
-rwxr-xr-x | sourceroot/functions.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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}" >/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 >/dev/tty1 2>&1' else |