summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-12-05 10:57:37 +0100
committerCorentin LABBE <clabbe@baylibre.com>2018-12-05 10:57:37 +0100
commitce71159f275334e17716d4f96ba8b26a0b628ceb (patch)
tree80b2840d2bb2d14e208c910ba1cfdc778f6185e3
parent7442ca80b0f0fd125fcaf5dc34c30fd4b23341bd (diff)
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")
-rwxr-xr-xlava-master/scripts/setup.sh3
1 files changed, 2 insertions, 1 deletions
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=""