From: Michael Prokop Date: Sat, 2 Mar 2019 09:40:56 +0000 (+0100) Subject: sshcopyid option: exit if `ssh-add -L` fails to execute X-Git-Tag: v0.88~2 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=de2ad0f7b35c8e6774e829d9fe15adff50d9844e;hp=de2ad0f7b35c8e6774e829d9fe15adff50d9844e sshcopyid option: exit if `ssh-add -L` fails to execute If a user requested the --sshcopyid option then it's supposed to be run successfully, otherwise it might leave an inaccessible system, so exit with error if execution of `ssh-add -L` fails. While at it: * simplify code (no need for $RC) * don't fail if directory /root/.ssh exists already * append keys to possibly existing /root/.ssh/authorized_keys file, instead of overwriting it ---