aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2015-08-07 12:30:25 +0200
committerGravatar Christian Hesse <mail@eworm.de>2015-08-07 12:30:25 +0200
commit995f6eb39ef39ab7056e0c74cc9da42c3a597012 (patch)
tree77eefc31a2f1c92601cf6b1a1b3b7dd5d8b90f66
parent9bcad47001687d95898346d3cc055d2b0175f589 (diff)
downloadmkinitcpio-passwd-995f6eb39ef39ab7056e0c74cc9da42c3a597012.tar.gz
mkinitcpio-passwd-995f6eb39ef39ab7056e0c74cc9da42c3a597012.tar.zst
do not print error on missing file
-rw-r--r--hook/passwd2
1 files changed, 1 insertions, 1 deletions
diff --git a/hook/passwd b/hook/passwd
index 22d6e10..1e2f861 100644
--- a/hook/passwd
+++ b/hook/passwd
@@ -42,7 +42,7 @@ run_latehook() {
authorized_key_home=$(egrep ^${authorized_key_user}: ${newroot}/etc/passwd | cut -d: -f 6)
if [[ "${authorized_key_type}" = "${authorized_key_key}" ]]; then
msg ":: Invalid option, no authorized key added."
- elif grep -q "${authorized_key_key}" "${newroot}/${authorized_key_home}/.ssh/authorized_keys"; then
+ elif grep -q "${authorized_key_key}" "${newroot}/${authorized_key_home}/.ssh/authorized_keys" 2>/dev/null; then
msg ":: Key already available, skipping."
else
if [[ ! -d "${newroot}/${authorized_key_home}" ]]; then