diff options
author | Christian Hesse <mail@eworm.de> | 2023-08-08 23:49:02 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-08-09 16:30:18 +0200 |
commit | 8ce1683733ab08b8a83b8837e6880f972f6aa324 (patch) | |
tree | 80e08e90a0618489be734af06d8b4afae30dfee4 /daily-psk.template.rsc | |
parent | 6d76704a97b7662aec51a45616a63f47e66c5b8f (diff) |
daily-psk: add support for wifiwave2
Diffstat (limited to 'daily-psk.template.rsc')
-rw-r--r-- | daily-psk.template.rsc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/daily-psk.template.rsc b/daily-psk.template.rsc index ea0fb46..125e6c5 100644 --- a/daily-psk.template.rsc +++ b/daily-psk.template.rsc @@ -56,12 +56,17 @@ $WaitFullyConnected; :local NewPsk [ $GeneratePSK $Date ]; :foreach AccList in=[ /caps-man/access-list/find where comment~$DailyPskMatchComment ] do={ +:foreach AccList in=[ /interface/wifiwave2/access-list/find where comment~$DailyPskMatchComment ] do={ :foreach AccList in=[ /interface/wireless/access-list/find where comment~$DailyPskMatchComment ] do={ :local SsidRegExp [ /caps-man/access-list/get $AccList ssid-regexp ]; + :local SsidRegExp [ /interface/wifiwave2/access-list/get $AccList ssid-regexp ]; :local Configuration ([ /caps-man/configuration/find where ssid~$SsidRegExp ]->0); + :local Configuration ([ /interface/wifiwave2/configuration/find where ssid~$SsidRegExp ]->0); :local Ssid [ /caps-man/configuration/get $Configuration ssid ]; + :local Ssid [ /interface/wifiwave2/configuration/get $Configuration ssid ]; :local OldPsk [ /caps-man/access-list/get $AccList private-passphrase ]; - # /caps-man above - /interface/wireless below + :local OldPsk [ /interface/wifiwave2/access-list/get $AccList passphrase ]; + # /caps-man /interface/wifiwave2 above - /interface/wireless below :local IntName [ /interface/wireless/access-list/get $AccList interface ]; :local Ssid [ /interface/wireless/get $IntName ssid ]; :local OldPsk [ /interface/wireless/access-list/get $AccList private-pre-shared-key ]; @@ -70,9 +75,11 @@ $WaitFullyConnected; :if ($NewPsk != $OldPsk) do={ $LogPrintExit2 info $0 ("Updating daily PSK for " . $Ssid . " to " . $NewPsk . " (was " . $OldPsk . ")") false; /caps-man/access-list/set $AccList private-passphrase=$NewPsk; + /interface/wifiwave2/access-list/set $AccList passphrase=$NewPsk; /interface/wireless/access-list/set $AccList private-pre-shared-key=$NewPsk; :if ([ :len [ /caps-man/actual-interface-configuration/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={ + :if ([ :len [ /interface/wifiwave2/actual-configuration/find where configuration.ssid=$Ssid ] ] > 0) do={ :if ([ :len [ /interface/wireless/find where name=$IntName !disabled ] ] = 1) do={ :foreach SeenSsid in=$Seen do={ :if ($SeenSsid = $Ssid) do={ |