summaryrefslogtreecommitdiffstats
path: root/lava-master
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-01-08 15:18:03 +0100
committerCorentin LABBE <clabbe@baylibre.com>2018-01-08 15:18:03 +0100
commit7cc953e318d9043988d21220c976db8cd24057f8 (patch)
treeb7522239440483a84dc670de0cbff301cb6d4403 /lava-master
parent633d0339534944b22c95e58dd069b76fb9dfcd44 (diff)
Fix custom device-type handling
Device-type are jinja2 files and not yaml files and so a have a different filename. So this patch correct the handling of custom device-types.
Diffstat (limited to 'lava-master')
-rwxr-xr-xlava-master/scripts/setup.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh
index 011a9c7..b60c93b 100755
--- a/lava-master/scripts/setup.sh
+++ b/lava-master/scripts/setup.sh
@@ -43,11 +43,12 @@ fi
# This directory is used for storing device-types already added
mkdir -p /root/.lavadocker/
if [ -e /root/device-types ];then
- for i in $(ls /root/device-types/*yaml)
+ for i in $(ls /root/device-types/*jinja2)
do
- cp /root/device-types/$i /etc/lava-server/dispatcher-config/device-types/
- devicetype=$(basename $i)
- lava-server manage device-types add $devicetype || exit 1
+ cp $i /etc/lava-server/dispatcher-config/device-types/
+ devicetype=$(basename $i |sed 's,.jinja2,,')
+ echo "Adding custom $devicetype"
+ lava-server manage device-types add $devicetype || exit $?
touch /root/.lavadocker/devicetype-$devicetype
done
fi