diff options
author | Kevin Hilman <khilman@baylibre.com> | 2019-09-04 09:24:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 09:24:52 -0700 |
commit | b62cce369977403b2b2fa5e6d7c0af9d71058364 (patch) | |
tree | 63f92d5c2c23a1842e65154129d74a26838bc0ce /lava-slave/scripts/setup.sh | |
parent | c0be09b6ddfd855eeadb3628a481f9c0bb4e26b7 (diff) | |
parent | 57bfd7462de249be794db3d015e7aa8177891863 (diff) |
Merge pull request #99 from montjoie/2019.07
2019.07
Diffstat (limited to 'lava-slave/scripts/setup.sh')
-rwxr-xr-x | lava-slave/scripts/setup.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh index 1fb0bb3..4bf2f67 100755 --- a/lava-slave/scripts/setup.sh +++ b/lava-slave/scripts/setup.sh @@ -143,6 +143,22 @@ do done done +for devicetype in $(ls /root/aliases/) +do + lavacli $LAVACLIOPTS device-types aliases list $devicetype > /tmp/device-types-aliases-$devicetype.list + while read alias + do + grep -q " $alias$" /tmp/device-types-aliases-$devicetype.list + if [ $? -eq 0 ];then + echo "DEBUG: $alias for $devicetype already present" + continue + fi + echo "DEBUG: Add alias $alias to $devicetype" + lavacli $LAVACLIOPTS device-types aliases add $devicetype $alias || exit $? + echo " $alias" >> /tmp/device-types-aliases-$devicetype.list + done < /root/aliases/$devicetype +done + if [ -e /etc/lava-dispatcher/certificates.d/$(hostname).key ];then echo "INFO: Enabling encryption" sed -i 's,.*ENCRYPT=.*,ENCRYPT="--encrypt",' /etc/lava-dispatcher/lava-slave |