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.
This commit is contained in:
Christian Hesse 2023-01-12 23:52:57 +01:00
parent bfd1361f71
commit b0595e53a5

View file

@ -4,7 +4,7 @@
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md # https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
# #
# requires RouterOS, version=7.1 # requires RouterOS, version=7.7
# #
# global functions # global functions
# https://git.eworm.de/cgit/routeros-scripts/about/ # https://git.eworm.de/cgit/routeros-scripts/about/
@ -581,12 +581,12 @@
:set Continue true; :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={ :if ([ :len [ /disk/find where slot=tmpfs type=tmpfs ] ] = 0) do={
$LogPrintExit2 info $0 ("Creating disk of type tmpfs.") false; $LogPrintExit2 info $0 ("Creating disk of type tmpfs.") false;
/file/remove [ find where name="tmpfs" type="directory" ]; /file/remove [ find where name="tmpfs" type="directory" ];
:do { :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"; $WaitForFile "tmpfs";
} on-error={ } on-error={
$LogPrintExit2 warning $0 ("Creating disk of type tmpfs failed!") false; $LogPrintExit2 warning $0 ("Creating disk of type tmpfs failed!") false;