From: Georgios Kontaxis Date: Sun, 21 Jun 2026 18:17:54 +0000 (+0000) Subject: etherwake: simplify password handling X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=537b30819d2dd6fd7e0da40f232c7ac9df2bd7bd;p=openwrt-packages.git etherwake: simplify password handling Signed-off-by: Georgios Kontaxis --- diff --git a/net/etherwake/files/etherwake.config b/net/etherwake/files/etherwake.config index f55bf8a41..c32e2fe9e 100644 --- a/net/etherwake/files/etherwake.config +++ b/net/etherwake/files/etherwake.config @@ -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' diff --git a/net/etherwake/files/etherwake.init b/net/etherwake/files/etherwake.init index 78120dae0..e440aeb50 100644 --- a/net/etherwake/files/etherwake.init +++ b/net/etherwake/files/etherwake.init @@ -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=':'