Fix removing ssh key that is last one in the file.

This commit is contained in:
Darko Poljak 2017-08-30 09:27:06 +02:00
commit eae399b025
2 changed files with 2 additions and 1 deletions

View file

@ -23,4 +23,4 @@ type_and_key="$(cat "$__object/parameter/key" | tr ' ' '\n' | awk '/^(ssh|ecdsa)
file="$(cat $__object/parameter/file)"
# get any entries that match the type and key
grep ".*$type_and_key[ \n]" "$file" || true
grep ".*$type_and_key\([ \n]\|$\)" "$file" || true