From e5cfa26853ecc5a8e58902f0ce50f560d903abab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Wed, 26 Jan 2022 10:21:18 +0000 Subject: [PATCH] fix: install: avoid cases of sigpipe on `tr` --- bin/admin/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/admin/install b/bin/admin/install index e801197..0bff967 100755 --- a/bin/admin/install +++ b/bin/admin/install @@ -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