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
owl
John Crispin 2013-06-10 08:24:13 +00:00
parent 9353e01af4
commit 5e45a68a4a
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,6 @@ fs_wait_for_key () {
keypressed=1 keypressed=1
[ "$(cat $keypress_true)" = "true" ] && keypressed=0 [ "$(cat $keypress_true)" = "true" ] && keypressed=0
[ -f "/tmp/failsafe_button" ] && keypressed=1
rm -f $keypress_true rm -f $keypress_true
rm -f $keypress_wait rm -f $keypress_wait
@ -80,6 +79,7 @@ failsafe_wait() {
preinit_net_echo "Please press button now to enter failsafe" preinit_net_echo "Please press button now to enter failsafe"
pi_failsafe_net_message=false pi_failsafe_net_message=false
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE 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 fi
} }