fix: install: adjust a sed to be FreeBSD 13 compliant

This commit is contained in:
Stéphane Lesimple 2021-05-21 08:40:50 +00:00 committed by Stéphane Lesimple
parent 5b8876a959
commit 60ad30ce5b

View file

@ -1323,8 +1323,9 @@ if [ "${opt[modify-pam-lastlog]}" = 1 ]; then
if ! grep -Eq '^\s*session\s+optional\s+pam_lastlog.so' "$PAM_SSHD" ; then
action_detail "missing lastlog config in file, adjusting"
# shellcheck disable=SC1004
sed_compat '/^\s*@include\s+common-session/a\
# bastion config: lastlog needs to be updated on connection\nsession optional pam_lastlog.so silent' "$PAM_SSHD"
sed_compat '/^[[:space:]]*@include[[:space:]]+common-session/a\
# bastion config: lastlog needs to be updated on connection\
session optional pam_lastlog.so silent' "$PAM_SSHD"
action_done
else
action_na "lastlog config was already ok"