global-functions: $MkDir: create with reasonable tmpfs-max-size

Giving no tmpfs-max-size breaks with RouterOS 7.8beta2, where a size
limit is enforced.
This commit is contained in:
Christian Hesse 2023-01-22 13:30:59 +01:00
parent c7498c6397
commit c8dcd92e6b

View file

@ -574,7 +574,7 @@
: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" ];
[ :parse "/disk/add slot=tmpfs type=tmpfs;" ];
[ :parse "/disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3);" ];
}
:set Continue true;
}