summaryrefslogtreecommitdiffstats
path: root/defaultenv-2/base/bin/init
diff options
context:
space:
mode:
Diffstat (limited to 'defaultenv-2/base/bin/init')
-rw-r--r--defaultenv-2/base/bin/init18
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