etherwake: simplify password handling
authorGeorgios Kontaxis <redacted>
Sun, 21 Jun 2026 18:17:54 +0000 (18:17 +0000)
committerGeorgios Kontaxis <redacted>
Mon, 22 Jun 2026 15:05:00 +0000 (15:05 +0000)
Signed-off-by: Georgios Kontaxis <redacted>
net/etherwake/files/etherwake.config
net/etherwake/files/etherwake.init

index f55bf8a41bd37728d3b83caf929f04e56cf4bb55..c32e2fe9e52fe003c19afcbed969d4f63f13dd23 100644 (file)
@@ -11,8 +11,8 @@ config 'target'
        option 'name' 'example'
        # mac address to wake up
        option 'mac' '11:22:33:44:55:66'
-       # password in hex without any delimiters
-       option 'password' 'AABBCCDDEEFF'
+       # secureOn password in ethernet hex format
+       option 'secureon' 'AA:BB:CC:DD:EE:FF'
        # wake up on system start, defaults to off
        option 'wakeonboot' 'off'
 
index 78120dae062baed49ef74084724cc0ca64e25e69..e440aeb50fd62923821f59b9f5ea87fd20454063 100644 (file)
@@ -66,13 +66,17 @@ do_etherwake()
        local password=''
        local args=''
 
-       # password
+       # password (legacy option)
        config_get value "${section}" 'password'
        [ -n "${value}" ] && {
                password=$(etherwake_password "${value}")
                append args "-p ${password}"
        }
 
+       # secureOn password
+       config_get value "${section}" 'secureon'
+       [ -n "${value}" ] && append args "-p ${value}"
+
        # mac address
        config_get value "${section}" 'mac'
        [ -z "${value}" ] && { echo "${initscript}: Target ${section} has no MAC address"; return 1; }
@@ -89,7 +93,7 @@ do_etherwake()
 }
 
 
-# prepare hex password
+# prepare hex password (support legacy option)
 etherwake_password()
 {
        local delimiter=':'
git clone https://git.99rst.org/PROJECT