mirror of
https://github.com/ovh/the-bastion.git
synced 2025-01-04 06:27:11 +08:00
fix: install: adjust a sed to be FreeBSD 13 compliant
This commit is contained in:
parent
5b8876a959
commit
60ad30ce5b
1 changed files with 3 additions and 2 deletions
|
@ -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
|
if ! grep -Eq '^\s*session\s+optional\s+pam_lastlog.so' "$PAM_SSHD" ; then
|
||||||
action_detail "missing lastlog config in file, adjusting"
|
action_detail "missing lastlog config in file, adjusting"
|
||||||
# shellcheck disable=SC1004
|
# shellcheck disable=SC1004
|
||||||
sed_compat '/^\s*@include\s+common-session/a\
|
sed_compat '/^[[:space:]]*@include[[:space:]]+common-session/a\
|
||||||
# bastion config: lastlog needs to be updated on connection\nsession optional pam_lastlog.so silent' "$PAM_SSHD"
|
# bastion config: lastlog needs to be updated on connection\
|
||||||
|
session optional pam_lastlog.so silent' "$PAM_SSHD"
|
||||||
action_done
|
action_done
|
||||||
else
|
else
|
||||||
action_na "lastlog config was already ok"
|
action_na "lastlog config was already ok"
|
||||||
|
|
Loading…
Reference in a new issue