aboutsummaryrefslogtreecommitdiffstats
path: root/hook/passwd
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-07-05 00:25:54 +0200
committerGravatar Christian Hesse <mail@eworm.de>2017-07-05 00:25:54 +0200
commitcbd941a7ce70ca3b50bc916a8a98be7fb8fcedb4 (patch)
tree068ae92cba3c457ff2133ab2bd43299e0a14bb28 /hook/passwd
parent995f6eb39ef39ab7056e0c74cc9da42c3a597012 (diff)
downloadmkinitcpio-passwd-cbd941a7ce70ca3b50bc916a8a98be7fb8fcedb4.tar.gz
mkinitcpio-passwd-cbd941a7ce70ca3b50bc916a8a98be7fb8fcedb4.tar.zst
do not use `egrep` but `grep -E`
Diffstat (limited to 'hook/passwd')
-rw-r--r--hook/passwd2
1 files changed, 1 insertions, 1 deletions
diff --git a/hook/passwd b/hook/passwd
index 1e2f861..db6899b 100644
--- a/hook/passwd
+++ b/hook/passwd
@@ -39,7 +39,7 @@ run_latehook() {
authorized_key_user="$(echo ${authorized_key_split} | cut -d: -f1)"
authorized_key_type="$(echo ${authorized_key_split} | cut -d: -f2)"
authorized_key_key="$(echo ${authorized_key_split} | cut -d: -f3)"
- authorized_key_home=$(egrep ^${authorized_key_user}: ${newroot}/etc/passwd | cut -d: -f 6)
+ authorized_key_home="$(grep -E "^${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" 2>/dev/null; then