aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-09-18 11:00:27 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-09-18 11:00:27 +0200
commit49737af6d191ec636030b1d408d3fb318ff9c9d0 (patch)
tree19556d61c31e677a61f3e99523d31e276db63664 /global-functions
parent6c3bcdecb296acaf11281da609ce1c32f3be611b (diff)
extend magic pattern with "by RouterOS"
This matches the string included in export.
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions8
1 files changed, 4 insertions, 4 deletions
diff --git a/global-functions b/global-functions
index 69add43..ad07a9c 100644
--- a/global-functions
+++ b/global-functions
@@ -1,4 +1,4 @@
-#!rsc
+#!rsc by RouterOS
# RouterOS script: global-functions
# Copyright (c) 2013-2020 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
@@ -533,11 +533,11 @@
:foreach Script in=$Scripts do={
:if ([ :len [ / system script find where name=$Script ] ] = 0) do={
$LogPrintExit info ("Adding new script: " . $Script) false;
- / system script add name=$Script source="#!rsc";
+ / system script add name=$Script source="#!rsc by RouterOS\n";
}
}
- :foreach Script in=[ / system script find where source~"^#!rsc" ] do={
+ :foreach Script in=[ / system script find where source~"^#!rsc( by RouterOS)\?\n" ] do={
:local Ignore 0;
:local ScriptVal [ / system script get $Script ];
:local ScriptFile [ / file find where name=("script-updates/" . $ScriptVal->"name") ];
@@ -597,7 +597,7 @@
}
:if ([ :len $SourceNew ] > 0) do={
- :if ([ :pick $SourceNew 0 5 ] = "#!rsc") do={
+ :if ([ :pick $SourceNew 0 18 ] = "#!rsc by RouterOS\n") do={
:if ($SourceNew != $ScriptVal->"source") do={
:local DontRequirePermissions \
($SourceNew~"\n# requires: dont-require-permissions=yes\n");