Преглед изворни кода

procd: make the preinit rules wildcard all buttons for failsafe

Signed-off-by: John Crispin <[email protected]>

SVN-Revision: 36896
John Crispin пре 12 година
родитељ
комит
e078f649b5

+ 3 - 2
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
 }
 

+ 0 - 1
package/procd/files/hotplug-preinit.json

@@ -14,7 +14,6 @@
 	[ "if",
 		[ "and",
 			[ "eq", "SUBSYSTEM", "button" ],
-			[ "eq", "BUTTON", "reset" ],
 		],
 		[ "exec", "/etc/rc.button/failsafe" ]
 	],