Commit ea73505e authored by Christian Hesse's avatar Christian Hesse

script-updates: send global-config changes notification just once

parent 7b1c275c
......@@ -8,6 +8,7 @@
:global ExpectedConfigVersion 4;
# global variables not to be changed by user
:global SentConfigChangesNotification "-";
:global SentRouterosUpdateNotification "-";
:global SentLteFirmwareUpgradeNotification "-";
:global Identity [ / system identity get name ];
......
......@@ -4,9 +4,10 @@
#
# update installed scripts from file or url
:global GlobalConfigVersion;
:global ExpectedConfigVersion;
:global GlobalConfigVersion;
:global Identity;
:global SentConfigChangesNotification;
:global ScriptUpdatesFetch;
:global ScriptUpdatesBaseUrl;
:global ScriptUpdatesUrlSuffix;
......@@ -78,7 +79,9 @@
}
}
:if ($ScriptUpdatesConfigChangesIgnore!=true && $GlobalConfigVersion < $ExpectedConfigVersion) do={
:if ($ScriptUpdatesConfigChangesIgnore!=true && \
$SentConfigChangesNotification!=$ExpectedConfigVersion && \
$GlobalConfigVersion < $ExpectedConfigVersion) do={
:global GlobalConfigChanges;
:local ChangeLogCode;
:local Changes;
......@@ -105,4 +108,5 @@
"GlobalConfigVersion (currently " . $GlobalConfigVersion . \
") to " . $ExpectedConfigVersion . " and re-run global-config.\n\n" . \
"Changes:" . $Changes);
:set SentConfigChangesNotification $ExpectedConfigVersion;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment