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(-) 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 From 5e382d869da96d31a21316edd6d68e444b43ecca Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Wed, 5 Dec 2018 10:59:40 +0100 Subject: lava-slave: lavacli cleanup Since we use the lavacli package, there are no reason to chdir in /root/lavacli. --- lava-slave/scripts/setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh index 9fbd796..e0e8322 100755 --- a/lava-slave/scripts/setup.sh +++ b/lava-slave/scripts/setup.sh @@ -11,7 +11,6 @@ if [ -z "$LAVA_MASTER_URI" ];then fi echo "Dynamic slave for $LAVA_MASTER ($LAVA_MASTER_URI)" -cd /root/lavacli LAVACLIOPTS="--uri $LAVA_MASTER_URI" # do a sort of ping for letting master to be up -- cgit 1.2.3-korg