From: blogic Date: Mon, 10 Jun 2013 08:24:44 +0000 (+0000) Subject: procd: make the preinit rules wildcard all buttons for failsafe X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=commitdiff_plain;h=181bf424027af6f3243645db40afc40bf4bc3dd2;ds=sidebyside procd: make the preinit rules wildcard all buttons for failsafe Signed-off-by: John Crispin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36896 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/lib/preinit/30_failsafe_wait b/package/base-files/files/lib/preinit/30_failsafe_wait index 5d6def72ac..3c5ece9f76 100644 --- a/package/base-files/files/lib/preinit/30_failsafe_wait +++ b/package/base-files/files/lib/preinit/30_failsafe_wait @@ -78,8 +78,9 @@ failsafe_wait() { pi_failsafe_net_message=true 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 + fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true + [ -f "/tmp/failsafe_button" ] && FAILSAFE=true + [ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe fi } diff --git a/package/procd/files/hotplug-preinit.json b/package/procd/files/hotplug-preinit.json index d212b22fac..614b104711 100644 --- a/package/procd/files/hotplug-preinit.json +++ b/package/procd/files/hotplug-preinit.json @@ -14,7 +14,6 @@ [ "if", [ "and", [ "eq", "SUBSYSTEM", "button" ], - [ "eq", "BUTTON", "reset" ], ], [ "exec", "/etc/rc.button/failsafe" ] ],