OSDN Git Service

init: fall back to busybox's shell
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 12 May 2020 15:09:26 +0000 (23:09 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 12 May 2020 15:09:26 +0000 (23:09 +0800)
Run busybox's shell if AOSP's shell fails to run. This makes
debug shell more reliable.

initrd/init

index fd2da25..e8899a7 100755 (executable)
@@ -135,6 +135,7 @@ debug_shell()
        if [ -x system/bin/sh ]; then
                echo Running MirBSD Korn Shell...
                USER="($1)" system/bin/sh -l 2>&1
+               [ $? -ne 0 ] && /bin/sh 2>&1
        else
                echo Running busybox ash...
                sh 2>&1