aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-06-10 08:24:13 +0000
committerJohn Crispin <blogic@openwrt.org>2013-06-10 08:24:13 +0000
commit204d07bcd29cf799be1e5f8f2ac85a4d665d233f (patch)
treece8f63e3669875b48b1e607455828f8d469e087c
parent64b1c42dac2e49d828bfb5feafd5f75e41ea6197 (diff)
downloadmaster-187ad058-204d07bcd29cf799be1e5f8f2ac85a4d665d233f.tar.gz
master-187ad058-204d07bcd29cf799be1e5f8f2ac85a4d665d233f.tar.bz2
master-187ad058-204d07bcd29cf799be1e5f8f2ac85a4d665d233f.zip
base-files: fix failsafe via button press
entering failsafe by pressing a button during boot was broken for procd as init Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36891 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/base-files/files/lib/preinit/30_failsafe_wait2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/lib/preinit/30_failsafe_wait b/package/base-files/files/lib/preinit/30_failsafe_wait
index bcf24f8bb7..5d6def72ac 100644
--- a/package/base-files/files/lib/preinit/30_failsafe_wait
+++ b/package/base-files/files/lib/preinit/30_failsafe_wait
@@ -63,7 +63,6 @@ fs_wait_for_key () {
keypressed=1
[ "$(cat $keypress_true)" = "true" ] && keypressed=0
- [ -f "/tmp/failsafe_button" ] && keypressed=1
rm -f $keypress_true
rm -f $keypress_wait
@@ -80,6 +79,7 @@ failsafe_wait() {
preinit_net_echo "Please press button now to enter failsafe"
pi_failsafe_net_message=false
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE
+ [ -f "/tmp/failsafe_button" ] && FAILSAFE=true && export FAILSAFE && rm /tmp/failsafe_button
fi
}