From 1cee36a911ef20374cbafc989a5d3699c3fc0def Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 3 Sep 2019 20:59:00 +0200 Subject: introduce global-config-overlay --- script-updates | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'script-updates') diff --git a/script-updates b/script-updates index de8bf40..8b70a98 100644 --- a/script-updates +++ b/script-updates @@ -63,6 +63,10 @@ :log info ("Updating script: " . $ScriptVal->"name"); / system script set owner=($ScriptVal->"name") source=$SourceNew \ dont-require-permissions=$DontRequirePermissions $Script; + :if ($ScriptVal->"name" = "global-config" && \ + [ / system script print count-only where name="global-config-overlay" ] > 0) do={ + / system script { run global-config; run global-config-overlay; } + } :if ($ScriptVal->"name" = "global-functions") do={ / system script run global-functions; } @@ -82,10 +86,14 @@ $GlobalConfigVersion < $ExpectedConfigVersion) do={ :global GlobalConfigChanges; :local ChangeLogCode; + :local ConfigScript "global-config"; + :if ([ /system script print count-only where name="global-config-overlay" ] > 0) do={ + :set ConfigScript "global-config-overlay"; + } :local NotificationMessage ("Current configuration on " . $Identity . \ - " is out of date. Please update global-config, then increase " . \ + " is out of date. Please update " . $ConfigScript . ", then increase " . \ "variable GlobalConfigVersion (currently " . $GlobalConfigVersion . \ - ") to " . $ExpectedConfigVersion . " and re-run global-config."); + ") to " . $ExpectedConfigVersion . " and re-run " . $ConfigScript . "."); :log debug ("Fetching changelog."); :do { -- cgit v1.2.3-54-g00ecf