]> git.99rst.org Git - openwrt-packages.git/commitdiff
etherwake: polish example configuration
authorGeorgios Kontaxis <redacted>
Sun, 21 Jun 2026 18:20:31 +0000 (18:20 +0000)
committerGeorgios Kontaxis <redacted>
Fri, 31 Jul 2026 07:26:39 +0000 (07:26 +0000)
- Make sure the default interface value promised
  in the configuration is enforced by the init
  script, not the underlying binary.
- Remove comments on how each option translates
  to a specific command-line argument for the
  underlying 'etherwake' binary.
- Rephrase comments to improve clarity.

Signed-off-by: Georgios Kontaxis <redacted>
net/etherwake/files/etherwake.config
net/etherwake/files/etherwake.init

index c32e2fe9e52fe003c19afcbed969d4f63f13dd23..cf025dcad91374a649f2fd52bab1775e923b67c0 100644 (file)
@@ -1,24 +1,17 @@
 config 'etherwake' 'setup'
-       # interface, defaults to 'eth0'
-       # -i <ifname>
-       option 'interface' ''
+       # interface to use, defaults to 'eth0'
+       #option 'interface' 'eth0'
        # send wake-up packet to the broadcast address, defaults to off
-       # -b
-       option 'broadcast' 'off'
+       #option 'broadcast' 'off'
 
 config 'target'
        # name for the target
-       option 'name' 'example'
-       # mac address to wake up
-       option 'mac' '11:22:33:44:55:66'
-       # secureOn password in ethernet hex format
-       option 'secureon' 'AA:BB:CC:DD:EE:FF'
+       #option 'name' 'example'
+       # mac address of the machine to wake up
+       #option 'mac' '00:11:22:33:44:55'
+       # (optional) 6-byte secureOn password in ethernet hex format
+       #option 'secureon' 'aa:bb:cc:dd:ee:ff'
+       # (optional) 4-byte secureOn password in dotted decimal format
+       #option 'secureon' '170.187.204.221'
        # wake up on system start, defaults to off
-       option 'wakeonboot' 'off'
-
-# To add a new target use:
-#  uci add etherwake target
-#  uci set etherwake.@target[-1].name=example
-#  uci set etherwake.@target[-1].mac=11:22:33:44:55:66
-#  uci set etherwake.@target[-1].password=AABBCCDDEEFF
-#  uci set etherwake.@target[-1].wakeonboot=off
+       #option 'wakeonboot' 'off'
index 8a136e3d2593a888aa87d7f111f7094660903e5b..1958785b5357d7eac59a14b1600f4c561c9540ab 100644 (file)
@@ -12,8 +12,8 @@ start()
        config_load "${NAME}"
 
        # interface
-       config_get value 'setup' 'interface'
-       [ -n "${value}" ] && append PROGRAM "-i ${value}"
+       config_get value 'setup' 'interface' 'eth0'
+       append PROGRAM "-i ${value}"
 
        # broadcast
        config_get_bool value 'setup' 'broadcast' '0'
git clone https://git.99rst.org/PROJECT