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

index f55bf8a41bd37728d3b83caf929f04e56cf4bb55..e3ebfcbd9f84fd85cb90f1915073314d589c347c 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'
+       # password in ethernet hex format
+       option 'password' 'AA:BB:CC:DD:EE:FF'
        # wake up on system start, defaults to off
        option 'wakeonboot' 'off'
 
index f267796093ded2202ca6955921f23e09ebe40538..27d64f823f0a9e5334a4692dbd22eaa77f2b5ad5 100644 (file)
@@ -70,10 +70,7 @@ do_etherwake()
 
        # password
        config_get value "${section}" 'password'
-       [ -n "${value}" ] && {
-               password=$(etherwake_password "${value}")
-               append args "-p ${password}"
-       }
+       [ -n "${value}" ] && append args "-p ${value}"
 
        # mac address
        config_get value "${section}" 'mac'
@@ -89,13 +86,3 @@ do_etherwake()
        ${PROGRAM} ${args}
        return $?
 }
-
-
-# prepare hex password
-etherwake_password()
-{
-       local delimiter=':'
-       local password=`echo "$1" | sed "s/../&${delimiter}/g"`
-       echo "${password%${delimiter}}"
-       return
-}
git clone https://git.99rst.org/PROJECT