Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:hardware:hardware.button [2022/04/22 16:36] – [Examples] use existence of file as state instead of sourcing introtdocs:guide-user:hardware:hardware.button [2022/04/27 15:48] – [Attach functions to a push button] some1
Line 2: Line 2:
 There several ways for controlling buttons in OpenWrt. There several ways for controlling buttons in OpenWrt.
   * [[#procd_buttons| buttons using procd]]   * [[#procd_buttons| buttons using procd]]
-  * [[#Hotplug_Buttons|Hotplug buttons]], using the hotplug daemon or procd in compatibility mode (hotplug itself was phased out with r36003).+  * [[#Hotplug_Buttons|Hotplug buttons]], using the hotplug daemon or procd in compatibility mode (hotplug itself was phased out with r36003, circa 2013).
   * [[#HID_buttons|HID buttons]], using ///dev/input/event// with an application like triggerhappy.   * [[#HID_buttons|HID buttons]], using ///dev/input/event// with an application like triggerhappy.
  
Line 221: Line 221:
     case "${1}" in     case "${1}" in
         "up"|"on") GOAL="on" ;;         "up"|"on") GOAL="on" ;;
-        "down"|"off") GOAL="wifi" ;;+        "down"|"off") GOAL="off" ;;
     esac     esac
 else else
-    # if the statefile exists, assume wifi is off 
     if [ -e "${STATEFILE}" ]; then     if [ -e "${STATEFILE}" ]; then
  GOAL="on"  GOAL="on"
     else     else
 +        # if the statefile doesn't exist, turn wifi off
         GOAL="off"         GOAL="off"
     fi     fi
  • Last modified: 2022/09/25 20:08
  • by kirelagin