diff options
-rw-r--r-- | accesslist-duplicates.capsman | 4 | ||||
-rw-r--r-- | accesslist-duplicates.local | 4 | ||||
-rw-r--r-- | accesslist-duplicates.template | 4 | ||||
-rw-r--r-- | backup-email | 2 | ||||
-rw-r--r-- | check-health | 4 | ||||
-rw-r--r-- | check-lte-firmware-upgrade | 2 | ||||
-rw-r--r-- | daily-psk.capsman | 2 | ||||
-rw-r--r-- | daily-psk.local | 2 | ||||
-rw-r--r-- | daily-psk.template | 2 | ||||
-rw-r--r-- | global-functions | 14 | ||||
-rw-r--r-- | lease-script | 2 | ||||
-rw-r--r-- | log-forward | 2 | ||||
-rw-r--r-- | mod/bridge-port-to | 2 | ||||
-rw-r--r-- | mod/bridge-port-vlan | 2 | ||||
-rw-r--r-- | mod/notification-matrix | 2 | ||||
-rw-r--r-- | mod/notification-telegram | 2 | ||||
-rw-r--r-- | netwatch-dns | 4 | ||||
-rw-r--r-- | netwatch-notify | 2 | ||||
-rw-r--r-- | sms-forward | 2 |
19 files changed, 30 insertions, 30 deletions
diff --git a/accesslist-duplicates.capsman b/accesslist-duplicates.capsman index e1f83a3..848ca52 100644 --- a/accesslist-duplicates.capsman +++ b/accesslist-duplicates.capsman @@ -14,8 +14,8 @@ :global Read; -:local Seen [ :toarray "" ]; -:local Shown [ :toarray "" ]; +:local Seen ({}); +:local Shown ({}); :foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={ :local Mac [ /caps-man/access-list/get $AccList mac-address ]; diff --git a/accesslist-duplicates.local b/accesslist-duplicates.local index c1bf2a2..67f16f3 100644 --- a/accesslist-duplicates.local +++ b/accesslist-duplicates.local @@ -14,8 +14,8 @@ :global Read; -:local Seen [ :toarray "" ]; -:local Shown [ :toarray "" ]; +:local Seen ({}); +:local Shown ({}); :foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={ :local Mac [ /interface/wireless/access-list/get $AccList mac-address ]; diff --git a/accesslist-duplicates.template b/accesslist-duplicates.template index 8ad8e8f..8676551 100644 --- a/accesslist-duplicates.template +++ b/accesslist-duplicates.template @@ -15,8 +15,8 @@ :global Read; -:local Seen [ :toarray "" ]; -:local Shown [ :toarray "" ]; +:local Seen ({}); +:local Shown ({}); :foreach AccList in=[ /%PATH%/access-list/find where mac-address!="00:00:00:00:00:00" ] do={ :local Mac [ /%PATH%/access-list/get $AccList mac-address ]; diff --git a/backup-email b/backup-email index 55f2309..7cdf55e 100644 --- a/backup-email +++ b/backup-email @@ -50,7 +50,7 @@ $WaitFullyConnected; :local FilePath ($0 . "/" . $FileName); :local BackupFile "none"; :local ConfigFile "none"; -:local Attach [ :toarray "" ]; +:local Attach ({}); # binary backup :if ($BackupSendBinary = true) do={ diff --git a/check-health b/check-health index 903c496..5da7d2a 100644 --- a/check-health +++ b/check-health @@ -35,10 +35,10 @@ } :if ([ :typeof $CheckHealthLast ] != "array") do={ - :set CheckHealthLast [ :toarray "" ]; + :set CheckHealthLast ({}); } :if ([ :typeof $CheckHealthTemperatureNotified ] != "array") do={ - :set CheckHealthTemperatureNotified [ :toarray "" ]; + :set CheckHealthTemperatureNotified ({}); } $ScriptLock $0; diff --git a/check-lte-firmware-upgrade b/check-lte-firmware-upgrade index 759b138..c039dad 100644 --- a/check-lte-firmware-upgrade +++ b/check-lte-firmware-upgrade @@ -13,7 +13,7 @@ :global SentLteFirmwareUpgradeNotification; :if ([ :typeof $SentLteFirmwareUpgradeNotification ] != "array") do={ - :global SentLteFirmwareUpgradeNotification [ :toarray "" ]; + :global SentLteFirmwareUpgradeNotification ({}); } :local CheckInterface do={ diff --git a/daily-psk.capsman b/daily-psk.capsman index 9f81be5..6e89ff2 100644 --- a/daily-psk.capsman +++ b/daily-psk.capsman @@ -55,7 +55,7 @@ $WaitFullyConnected; ($DailyPskSecrets->2->$WeekDay)); } -:local Seen [ :toarray "" ]; +:local Seen ({}); :local Date [ /system/clock/get date ]; :local NewPsk [ $GeneratePSK $Date ]; diff --git a/daily-psk.local b/daily-psk.local index e2a5886..3876430 100644 --- a/daily-psk.local +++ b/daily-psk.local @@ -55,7 +55,7 @@ $WaitFullyConnected; ($DailyPskSecrets->2->$WeekDay)); } -:local Seen [ :toarray "" ]; +:local Seen ({}); :local Date [ /system/clock/get date ]; :local NewPsk [ $GeneratePSK $Date ]; diff --git a/daily-psk.template b/daily-psk.template index bd457dc..af05cd7 100644 --- a/daily-psk.template +++ b/daily-psk.template @@ -56,7 +56,7 @@ $WaitFullyConnected; ($DailyPskSecrets->2->$WeekDay)); } -:local Seen [ :toarray "" ]; +:local Seen ({}); :local Date [ /system/clock/get date ]; :local NewPsk [ $GeneratePSK $Date ]; diff --git a/global-functions b/global-functions index 94f3763..8ef158a 100644 --- a/global-functions +++ b/global-functions @@ -585,7 +585,7 @@ # prepare NotificationFunctions array :if ([ :typeof $NotificationFunctions ] != "array") do={ - :set NotificationFunctions [ :toarray "" ]; + :set NotificationFunctions ({}); } # send notification via e-mail - expects one array argument @@ -612,7 +612,7 @@ } :if ([ :typeof $EmailQueue ] = "nothing") do={ - :set EmailQueue [ :toarray "" ]; + :set EmailQueue ({}); } :local Signature [ /system/note/get note ]; :set ($EmailQueue->[ :len $EmailQueue ]) { @@ -634,7 +634,7 @@ :if ([ :typeof $Source ] != "array") do={ :set Source [ :tostr $1 ]; } - :local Result [ :toarray "" ]; + :local Result ({}); :foreach KeyValue in=[ :toarray $Source ] do={ :if ([ :find $KeyValue "=" ]) do={ :set ($Result->[ :pick $KeyValue 0 [ :find $KeyValue "=" ] ]) \ @@ -974,10 +974,10 @@ :global ScriptLockOrder; :if ([ :typeof $ScriptLockOrder ] = "nothing") do={ - :set ScriptLockOrder [ :toarray "" ]; + :set ScriptLockOrder ({}); } :if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={ - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; + :set ($ScriptLockOrder->$Script) ({}); } :local JobCount do={ @@ -1052,7 +1052,7 @@ } } - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; + :set ($ScriptLockOrder->$Script) ({}); } :if ([ :len [ /system/script/find where name=$Script ] ] = 0) do={ @@ -1065,7 +1065,7 @@ :if ([ $TicketCount $Script ] >= [ $JobCount $Script ]) do={ $LogPrintExit2 error $0 ("More tickets than running scripts '" . $Script . "', resetting!") false; - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; + :set ($ScriptLockOrder->$Script) ({}); /system/script/job/remove [ find where script=$Script ]; } diff --git a/lease-script b/lease-script index fa03e11..cc1b6e5 100644 --- a/lease-script +++ b/lease-script @@ -31,7 +31,7 @@ $ScriptLock $0 false 10; $LogPrintExit2 debug $0 ("More invocations are waiting, exiting early.") true; } -:local RunOrder [ :toarray "" ]; +:local RunOrder ({}); :foreach Script in=[ /system/script/find where source~("\n# provides: lease-script, ") ] do={ :local Name [ /system/script/get $Script name ]; diff --git a/log-forward b/log-forward index 63c7ea7..6ccad4f 100644 --- a/log-forward +++ b/log-forward @@ -46,7 +46,7 @@ $ScriptLock $0; :local Messages ""; :local Warning false; :local MessageVal; -:local MessageDups [ :toarray "" ]; +:local MessageDups ({}); :local LogForwardFilterLogForwarding ("^Error sending e-mail <(" . \ [ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \ diff --git a/mod/bridge-port-to b/mod/bridge-port-to index ae74824..3f62e6f 100644 --- a/mod/bridge-port-to +++ b/mod/bridge-port-to @@ -15,7 +15,7 @@ :global LogPrintExit2; :global ParseKeyValueStore; - :local InterfaceReEnable [ :toarray "" ]; + :local InterfaceReEnable ({}); :foreach BridgePort in=[ /interface/bridge/port/find where !(comment=[]) ] do={ :local BridgePortVal [ /interface/bridge/port/get $BridgePort ]; :foreach Config,BridgeDefault in=[ $ParseKeyValueStore ($BridgePortVal->"comment") ] do={ diff --git a/mod/bridge-port-vlan b/mod/bridge-port-vlan index a43d7d7..9a6e08a 100644 --- a/mod/bridge-port-vlan +++ b/mod/bridge-port-vlan @@ -15,7 +15,7 @@ :global LogPrintExit2; :global ParseKeyValueStore; - :local InterfaceReEnable [ :toarray "" ]; + :local InterfaceReEnable ({}); :foreach BridgePort in=[ /interface/bridge/port/find where !(comment=[]) ] do={ :local BridgePortVal [ /interface/bridge/port/get $BridgePort ]; :foreach Config,Vlan in=[ $ParseKeyValueStore ($BridgePortVal->"comment") ] do={ diff --git a/mod/notification-matrix b/mod/notification-matrix index f905839..c4dd27b 100644 --- a/mod/notification-matrix +++ b/mod/notification-matrix @@ -129,7 +129,7 @@ $LogPrintExit2 info $0 ("Failed sending Matrix notification! Queuing...") false; :if ([ :typeof $MatrixQueue ] = "nothing") do={ - :set MatrixQueue [ :toarray "" ]; + :set MatrixQueue ({}); } :local Text ([ $SymbolForNotification "alarm-clock" ] . \ "This message was queued since " . [ /system/clock/get date ] . \ diff --git a/mod/notification-telegram b/mod/notification-telegram index 493aa00..8c4cd65 100644 --- a/mod/notification-telegram +++ b/mod/notification-telegram @@ -139,7 +139,7 @@ $LogPrintExit2 info $0 ("Failed sending telegram notification! Queuing...") false; :if ([ :typeof $TelegramQueue ] = "nothing") do={ - :set TelegramQueue [ :toarray "" ]; + :set TelegramQueue ({}); } :set Text ($Text . [ $UrlEncode ("\n" . [ $SymbolForNotification "alarm-clock" ] . \ [ $EscapeMD ("This message was queued since " . [ /system/clock/get date ] . \ diff --git a/netwatch-dns b/netwatch-dns index 82a8599..7ec1bb4 100644 --- a/netwatch-dns +++ b/netwatch-dns @@ -21,8 +21,8 @@ $ScriptLock $0; $LogPrintExit2 info $0 ("System just booted, giving netwatch some time to settle.") true; } -:local DnsServers [ :toarray "" ]; -:local DnsFallback [ :toarray "" ]; +:local DnsServers ({}); +:local DnsFallback ({}); :local DnsCurrent [ /ip/dns/get servers ]; :foreach Host in=[ /tool/netwatch/find where comment~"dns" !disabled ] do={ diff --git a/netwatch-notify b/netwatch-notify index a725fc3..3b84a06 100644 --- a/netwatch-notify +++ b/netwatch-notify @@ -56,7 +56,7 @@ $ScriptLock $0; } :if ([ :typeof $NetwatchNotify ] = "nothing") do={ - :set NetwatchNotify [ :toarray "" ]; + :set NetwatchNotify ({}); } :foreach Host in=[ /tool/netwatch/find where comment~"notify" !disabled ] do={ diff --git a/sms-forward b/sms-forward index b392805..aa2e71c 100644 --- a/sms-forward +++ b/sms-forward @@ -33,7 +33,7 @@ $WaitFullyConnected; :while ([ :len [ /tool/sms/inbox/find ] ] > 0) do={ :local Phone [ /tool/sms/inbox/get ([ find ]->0) phone ]; :local Messages ""; - :local Delete [ :toarray "" ]; + :local Delete ({}); :foreach Sms in=[ /tool/sms/inbox/find where phone=$Phone ] do={ :local SmsVal [ /tool/sms/inbox/get $Sms ]; |