From 086a395e8233b81f702884492c7edb11e5fd0c32 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 21 Jan 2021 11:15:49 +0100 Subject: global-functions: $ScriptInstallUpdate: give hint on changes --- global-functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/global-functions b/global-functions index a46f35d..c1311cf 100644 --- a/global-functions +++ b/global-functions @@ -597,6 +597,8 @@ } } + :local ScriptInstallUpdateBefore $ScriptInstallUpdate; + :foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={ :local ScriptVal [ / system script get $Script ]; :local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ]; @@ -735,6 +737,10 @@ $NotificationMessage $Link; :set SentConfigChangesNotification $ExpectedConfigVersion; } + + :if ($ScriptInstallUpdateBefore != $ScriptInstallUpdate) do={ + $LogPrintExit info ("This function '\$ScriptInstallUpdate' changed, you may want to re-run.") false; + } } # lock script against multiple invocation -- cgit v1.2.3-70-g09d2