This commit is contained in:
toby 2019-04-05 18:09:30 +00:00
commit 7d5a761793
1 changed files with 11 additions and 2 deletions

View File

@ -7,10 +7,19 @@ if [ ${#IFACE} -gt 14 ]; then
exit 10 exit 10
fi fi
source /etc/libvirt/hooks/$IFACE if [ -e /etc/libvirt/hooks/$IFACE ]
then
source /etc/libvirt/hooks/$IFACE
else
eval $(
curl --fail --connect-timeout 5 -s http://stackapi.usw3.admin.stage.wit.com:4000/network_interface?interface_name=$IFACE && \
curl --fail --connect-timeout 5 -s http://stackapi.usw3.admin.stage.wit.com:4001/network_interface?interface_name=$IFACE
)
CLUSTER=${VNI:-""}
fi
if ! [[ $CLUSTER =~ ^[0-9]+$ ]]; then if ! [[ $CLUSTER =~ ^[0-9]+$ ]]; then
echo "CLUSTER seems not to be valid" echo "CLUSTER '$CLUSTER' seems not to be valid"
exit 10 exit 10
fi fi