From 68f61ae6221afeb279ea3823e42cb8da4656a2a6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 16 Jul 2024 12:27:08 +0200 Subject: global-functions: $ScriptInstallUpdate: allow CRLF on device --- global-functions.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'global-functions.rsc') diff --git a/global-functions.rsc b/global-functions.rsc index 2c7c87c..327443a 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1074,7 +1074,8 @@ } :if ([ :len $SourceNew ] > 0) do={ - :if ($SourceNew != $ScriptVal->"source") do={ + :local SourceCRLF [ :tocrlf $SourceNew ]; + :if ($SourceNew != $ScriptVal->"source" && $SourceCRLF != $ScriptVal->"source") do={ :if ([ :pick $SourceNew 0 18 ] = "#!rsc by RouterOS\n") do={ :local Required ([ $ParseKeyValueStore [ $Grep $SourceNew ("\23 requires RouterOS, ") ] ]->"version"); :if ([ $RequiredRouterOS $0 [ $EitherOr $Required "0.0" ] false ] = true) do={ -- cgit v1.2.3-70-g09d2