mirror of
https://github.com/ovh/the-bastion.git
synced 2025-02-27 00:54:26 +08:00
fix: install: avoid cases of sigpipe on tr
This commit is contained in:
parent
dc16e628e2
commit
e5cfa26853
1 changed files with 2 additions and 2 deletions
|
@ -862,12 +862,12 @@ if [ "$nothing" = 0 ]; then
|
|||
fi
|
||||
|
||||
action_doing "Ensuring all bastion accounts are in the bastion-users group"
|
||||
bastion_users_members=$(getent group bastion-users | cut -d: -f4)
|
||||
bastion_users_members=$(getent group bastion-users | cut -d: -f4 | tr , " ")
|
||||
at_least_one_changed=0
|
||||
at_least_one_error=0
|
||||
for account in $(getent passwd | grep ":$basedir/bin/shell/osh.pl$" | cut -d: -f1) proxyhttp
|
||||
do
|
||||
if ! echo "$bastion_users_members" | tr "," "\\n" | grep -q -w "$account"; then
|
||||
if ! echo "$bastion_users_members" | grep -q -w "$account"; then
|
||||
action_detail "... $account"
|
||||
add_user_to_group_compat "$account" "bastion-users" || at_least_one_error=1
|
||||
at_least_one_changed=1
|
||||
|
|
Loading…
Reference in a new issue