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=bb84bbc83051bde7692821f5de6323581cadac9d;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 f26779609..c3b1ab581 100644 --- a/net/etherwake/files/etherwake.init +++ b/net/etherwake/files/etherwake.init @@ -68,13 +68,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; } @@ -91,7 +95,7 @@ do_etherwake() } -# prepare hex password +# prepare hex password (support legacy option) etherwake_password() { local delimiter=':'