diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-15 21:43:32 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-16 21:32:24 +0100 |
commit | b26c1c30ebf212bf5c18b56856c7ae8241e7db32 (patch) | |
tree | fce404a818ae794fb25704f009808a12a7b0e3d3 /defaultenv-2 | |
parent | cbc3e0f6d40bdea8f960e9f1aba1e9d5b836f01c (diff) | |
download | barebox-b26c1c30ebf212bf5c18b56856c7ae8241e7db32.tar.gz barebox-b26c1c30ebf212bf5c18b56856c7ae8241e7db32.tar.xz |
defaultenv-2: execute init/* before timeout
so we can have splash, usb serial, etc...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv-2')
-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 |