mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-14 23:12:28 +02:00
mod/ssh-keys-import: $SSHKeysImport: use $ExitError to indicate unintentional error
This commit is contained in:
parent
73e0ac75f1
commit
1788c05998
1 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
||||||
:global SSHKeysImportFile;
|
:global SSHKeysImportFile;
|
||||||
|
|
||||||
# import single key passed as string
|
# import single key passed as string
|
||||||
:set SSHKeysImport do={
|
:set SSHKeysImport do={ :do {
|
||||||
:local Key [ :tostr $1 ];
|
:local Key [ :tostr $1 ];
|
||||||
:local User [ :tostr $2 ];
|
:local User [ :tostr $2 ];
|
||||||
|
|
||||||
|
@ -64,7 +64,9 @@
|
||||||
/file/remove "tmpfs/ssh-keys-import";
|
/file/remove "tmpfs/ssh-keys-import";
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
}
|
} on-error={
|
||||||
|
:global ExitError; $ExitError false $0;
|
||||||
|
} }
|
||||||
|
|
||||||
# import keys from a file
|
# import keys from a file
|
||||||
:set SSHKeysImportFile do={
|
:set SSHKeysImportFile do={
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue