diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-04 15:49:00 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-04 15:49:00 +0100 |
commit | da5fe0ba470283b384760c4976815fc20c1d45bd (patch) | |
tree | 11f2a08de885570d5d8c453f0c8b384427c666c0 /defaultenv-2/base/bin/init | |
parent | aacd51bfd2d20138b6f9c549fb4f1aa66e88243b (diff) | |
parent | 195310fd7b48e2c1198f216f9b4122d8f63e620e (diff) | |
download | barebox-da5fe0ba470283b384760c4976815fc20c1d45bd.tar.gz barebox-da5fe0ba470283b384760c4976815fc20c1d45bd.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'defaultenv-2/base/bin/init')
-rw-r--r-- | defaultenv-2/base/bin/init | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init index bb4abcdec9..b606b634a2 100644 --- a/defaultenv-2/base/bin/init +++ b/defaultenv-2/base/bin/init @@ -15,20 +15,15 @@ global editcmd=sedit /env/config -if [ ${global.allow_color} = "true" ]; then - export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m " -else - export PS1="barebox@\h:\w " -fi - if [ -e /env/menu ]; then echo -e -n "\nHit m for menu or any other key to stop autoboot: " 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 +33,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 |