diff options
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/global-functions b/global-functions index 9ff6bd5..a9c1c93 100644 --- a/global-functions +++ b/global-functions @@ -525,6 +525,7 @@ :global CleanFilePath; :global GetRandom20CharAlNum; :global LogPrintExit2; + :global RequiredRouterOS; :global WaitForFile; :set Path [ $CleanFilePath $Path ]; @@ -547,6 +548,15 @@ :set Continue true; } + :if ($Continue = false && $PathNext = "tmpfs" && [ $RequiredRouterOS $0 "7.7rc1" false ] = true) 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" ]; + [ :parse "/disk/add slot=tmpfs type=tmpfs;" ]; + } + :set Continue true; + } + :if ($Continue = false && [ :len [ /file/find where name=$PathNext ] ] = 1) do={ $LogPrintExit2 warning $0 ("The path '" . $PathNext . "' exists, but is not a directory.") false; :return false; |