commit:     83e20abc4088395ffe47faf428e324c33b42e894
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 30 01:16:15 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Mar 30 01:27:55 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=83e20abc

init: fix "sh: can't access tty; job control turned off"

Link: https://busybox.net/FAQ.html#job_control
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/initrd.scripts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 5d3a220..b9b958b 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1567,7 +1567,8 @@ setup_md_device() {
 
 do_rundebugshell() {
        good_msg 'Type "exit" to continue with normal bootup.'
-       [ -x /bin/sh ] && /bin/sh || /bin/ash
+       [ -x /bin/sh ] && SH=/bin/sh || SH=/bin/ash
+       setsid ${SH} -c "exec cttyhack ${SH} --login"
 }
 
 rundebugshell() {

Reply via email to