Commit a11cb99a authored by Michał "rysiek" Woźniak's avatar Michał "rysiek" Woźniak
Browse files

bugfix: assemble_authorized_keys now handles missing keys properly

(cherry picked from commit e61190d5)
parent 35a1661f
......@@ -38,9 +38,10 @@ function assemble_authorized_keys {
fi
# let's check if the pubkey file(s) exists, shall we?
KEYFILES="$( compgen -G "${PUBKEYDIR}/${KEYGLOB}" )"
# '|| true' needed because we're in a `set -e` situation
KEYFILES="$( compgen -G "${PUBKEYDIR}/${KEYGLOB}" || true )"
# did we find anything?
if [ $? == 0 ]; then
if [ "$KEYFILES" != "" ]; then
echo " +-- found keyfile(s), processing..."
# the IFS is conveniently already set to newline and newline only
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment