Verified Commit 352488a8 authored by Loïc Dachary's avatar Loïc Dachary Committed by Loïc Dachary

infrastructure: display error message when interfaces do not come up

parent 25b196ed
......@@ -64,7 +64,6 @@ resources:
str_replace:
template: |
#!/bin/bash
set -x
if ! test -f /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg ; then
echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
rm -f /etc/network/interfaces.d/50-cloud-init.cfg
......@@ -78,6 +77,9 @@ resources:
fi
sleep 1
done
if test "$(cat /sys/class/net/$i/operstate)" != "up" ; then
echo "the $i interface is not up, giving up"
fi
fi
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment