base-files: be verbose when entering failsafe due to a button being pressed
authorJohn Crispin <john@openwrt.org>
Thu, 25 Jul 2013 20:28:36 +0000 (20:28 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 25 Jul 2013 20:28:36 +0000 (20:28 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37535

package/base-files/files/etc/rc.button/failsafe
package/base-files/files/lib/preinit/30_failsafe_wait

index dcdf7de80e94ac99eeac0f8d3a1e7d1f407676e0..b372c04c4e700297b12d613c8abefffcc13414f0 100755 (executable)
@@ -1,2 +1,2 @@
 #!/bin/sh
-touch /tmp/failsafe_button
+echo ${BUTTON} > /tmp/failsafe_button
index 3c5ece9f76f8049845fc498f1ffac57eb89561c2..6bce8ae49f3cae68d057f490eac3f616cdd03d73 100644 (file)
@@ -79,7 +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
-      [ -f "/tmp/failsafe_button" ] && FAILSAFE=true
+      [ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
       [ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
     fi
 }