summaryrefslogtreecommitdiffstats
path: root/lava-master/scripts/setup.sh
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2019-03-20 11:56:39 +0100
committerCorentin LABBE <clabbe@baylibre.com>2019-04-01 14:42:03 +0200
commit12d276e4a5d62b571c196115aea3659e8545f265 (patch)
tree741ac841bc844d056bf576083cd36a4d71e08387 /lava-master/scripts/setup.sh
parentaa5bbacca152343b5d8b692462d547b525b04ccf (diff)
lava-master: warning when overwriting existing device-types
Diffstat (limited to 'lava-master/scripts/setup.sh')
-rwxr-xr-xlava-master/scripts/setup.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh
index c22a06f..489dd51 100755
--- a/lava-master/scripts/setup.sh
+++ b/lava-master/scripts/setup.sh
@@ -151,6 +151,10 @@ mkdir -p /root/.lavadocker/
if [ -e /root/device-types ];then
for i in $(ls /root/device-types/*jinja2)
do
+ if [ -e /etc/lava-server/dispatcher-config/device-types/$(basename $i) ];then
+ echo "WARNING: overwriting device-type $i"
+ diff -u "/etc/lava-server/dispatcher-config/device-types/$(basename $i)" $i
+ fi
cp $i /etc/lava-server/dispatcher-config/device-types/
devicetype=$(basename $i |sed 's,.jinja2,,')
lava-server manage device-types list | grep -q "[[:space:]]$devicetype[[:space:]]"