From ce71159f275334e17716d4f96ba8b26a0b628ceb Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Wed, 5 Dec 2018 10:57:37 +0100 Subject: lava-master: fix group handling When there are no group, the grep return non-0 and setup.sh exits. This patch fix by doing the filter in two step. Fixes: e489f60b449b ("lava-master: skip creation of already existing groups") --- lava-master/scripts/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lava-master/scripts') diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh index e662a2b..34cd0a1 100755 --- a/lava-master/scripts/setup.sh +++ b/lava-master/scripts/setup.sh @@ -71,7 +71,8 @@ if [ -e /root/lava-groups ];then echo "Handle groups" echo "======================================================" GROUP_CURRENT_LIST=/tmp/group.list - lava-server manage groups list |grep '^\*' > $GROUP_CURRENT_LIST || exit 1 + lava-server manage groups list > ${GROUP_CURRENT_LIST}.raw || exit 1 + grep '^\*' ${GROUP_CURRENT_LIST}.raw > ${GROUP_CURRENT_LIST} for group in $(ls /root/lava-groups/*group) do GROUPNAME="" -- cgit 1.2.3-korg