diff options
author | Christian Hesse <mail@eworm.de> | 2023-11-07 13:48:49 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-11-09 15:34:10 +0100 |
commit | 98d7eee454bde21932cea700fda3d74ab4fc1336 (patch) | |
tree | e1bcccbcdb09ed7b7ed751afac1da1b4cad139e0 /mod | |
parent | b22dfbfc948edced83f1eb24e20b4a21f35a85f0 (diff) |
mod/ssh-keys-import: continue import after intermediate failure
Diffstat (limited to 'mod')
-rw-r--r-- | mod/ssh-keys-import.rsc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/ssh-keys-import.rsc b/mod/ssh-keys-import.rsc index dd80fe9..1513114 100644 --- a/mod/ssh-keys-import.rsc +++ b/mod/ssh-keys-import.rsc @@ -87,7 +87,11 @@ :set Keys [ :pick $Keys ([ :find $Keys "\n" ] + 1) [ :len $Keys ] ]; :local KeyVal [ :toarray [ $CharacterReplace $Key " " "," ] ]; :if ($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa") do={ - $SSHKeysImport $Line $User; + :do { + $SSHKeysImport $Line $User; + } on-error={ + $LogPrintExit2 warning $0 ("Failed importing key for user '" . $User . "'.") false; + } :set Continue true; } :if ($Continue = false && $KeyVal->0 = "#") do={ |