From 4b4346d0b48af91c843fb5d8f391306fed844ced Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 May 2025 10:05:39 +0200 Subject: [PATCH] mod/ssh-keys-import: fix error condition --- mod/ssh-keys-import.rsc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mod/ssh-keys-import.rsc b/mod/ssh-keys-import.rsc index 176c1b46..94675255 100644 --- a/mod/ssh-keys-import.rsc +++ b/mod/ssh-keys-import.rsc @@ -94,9 +94,7 @@ :foreach KeyVal in=[ :deserialize $Keys delimiter=" " from=dsv options=dsv.plain ] do={ :local Continue false; :if ($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa") do={ - :do { - $SSHKeysImport ($KeyVal->0 . " " . $KeyVal->1 . " " . $KeyVal->2) $User; - } on-error={ + :if ([ $SSHKeysImport ($KeyVal->0 . " " . $KeyVal->1 . " " . $KeyVal->2) $User ] = false) do={ $LogPrint warning $0 ("Failed importing key for user '" . $User . "'."); } :set Continue true;