diff options
-rw-r--r-- | defaultenv-2/base/bin/init | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init index bb4abcdec9..c377ecafc4 100644 --- a/defaultenv-2/base/bin/init +++ b/defaultenv-2/base/bin/init @@ -27,8 +27,9 @@ else echo -e -n "\nHit any key to stop autoboot: " fi -timeout -a $global.autoboot_timeout -v key -autoboot="$?" +# allow to stop the boot before execute the /env/init/* +# but without waiting +timeout -s -a -v key 0 if [ "${key}" = "q" ]; then exit @@ -38,6 +39,13 @@ for i in /env/init/*; do . $i done +timeout -a $global.autoboot_timeout -v key +autoboot="$?" + +if [ "${key}" = "q" ]; then + exit +fi + if [ "$autoboot" = 0 ]; then boot fi |