adding curl supprt to the qemu-ifup script again

This commit is contained in:
toby 2019-04-05 17:58:55 +00:00
parent b8e6a8a418
commit 7a00635a57
1 changed files with 11 additions and 2 deletions

View File

@ -7,10 +7,19 @@ if [ ${#IFACE} -gt 14 ]; then
exit 10
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
echo "CLUSTER seems not to be valid"
echo "CLUSTER '$CLUSTER' seems not to be valid"
exit 10
fi