mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $MkDir: use shorter random string
... but with all characters from alphabet with $GetRandom20CharAlNum.
This commit is contained in:
@ -506,7 +506,7 @@
|
|||||||
:local Dir [ :tostr $1 ];
|
:local Dir [ :tostr $1 ];
|
||||||
|
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global GetRandom20CharHex;
|
:global GetRandom20CharAlNum;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
:global WaitForFile;
|
:global WaitForFile;
|
||||||
|
|
||||||
@ -521,7 +521,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:local Return true;
|
:local Return true;
|
||||||
:local Name ($Dir . "-" . [ $GetRandom20CharHex ]);
|
:local Name ($Dir . "-" . [ $GetRandom20CharAlNum 6 ]);
|
||||||
:do {
|
:do {
|
||||||
/ip/smb/share/add disabled=yes directory=$Dir name=$Name;
|
/ip/smb/share/add disabled=yes directory=$Dir name=$Name;
|
||||||
$WaitForFile $Dir;
|
$WaitForFile $Dir;
|
||||||
|
Reference in New Issue
Block a user