aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-06-10 08:24:13 +0000
committerJohn Crispin <john@openwrt.org>2013-06-10 08:24:13 +0000
commit5e45a68a4a68afe92be61d73d95ebb6fb81074cb (patch)
treea5980e490d9e9e8b93b206f780bdeb0834f6f549
parent9353e01af472f336e4753a6a4c0a3b0698108d48 (diff)
downloadupstream-5e45a68a4a68afe92be61d73d95ebb6fb81074cb.tar.gz
upstream-5e45a68a4a68afe92be61d73d95ebb6fb81074cb.tar.bz2
upstream-5e45a68a4a68afe92be61d73d95ebb6fb81074cb.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> SVN-Revision: 36891
-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
}