From b0595e53a5ebbbadd88e51ce6c0f70d93549f5f2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 12 Jan 2023 23:52:57 +0100 Subject: global-functions: $MkDir: drop the compatibility workaround If you are still running RouterOS 7.6 or older add this in your global-config-overlay: :global ScriptUpdatesUrlSuffix "\?h=routeros-7.7~1"; ... and remeber to revert that change once updated. --- global-functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index f15a7d1..996a6e1 100644 --- a/global-functions +++ b/global-functions @@ -4,7 +4,7 @@ # Michael Gisbers # https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md # -# requires RouterOS, version=7.1 +# requires RouterOS, version=7.7 # # global functions # https://git.eworm.de/cgit/routeros-scripts/about/ @@ -581,12 +581,12 @@ :set Continue true; } - :if ($Continue = false && $PathNext = "tmpfs" && [ $RequiredRouterOS $0 "7.7rc1" false ] = true) do={ + :if ($Continue = false && $PathNext = "tmpfs") do={ :if ([ :len [ /disk/find where slot=tmpfs type=tmpfs ] ] = 0) do={ $LogPrintExit2 info $0 ("Creating disk of type tmpfs.") false; /file/remove [ find where name="tmpfs" type="directory" ]; :do { - [ :parse "/disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3);" ]; + /disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3); $WaitForFile "tmpfs"; } on-error={ $LogPrintExit2 warning $0 ("Creating disk of type tmpfs failed!") false; -- cgit v1.2.3-70-g09d2