summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-08-28 19:01:51 +0000
committerGerrit Code Review <review@openstack.org>2017-08-28 19:01:51 +0000
commitfbd7283bc9a806790c3d272df4cfbe0c39049999 (patch)
tree4b5155e81e16bf6c773686b1ccb06d9bc3a4009f /network
parentde1b38bb45fc4516490315efd819666917037476 (diff)
parent56eaad835dde784a963d8802f862d9827ec942ed (diff)
Merge "Handle failure of carrier check in configure_safe_defaults()" into stable/pike
Diffstat (limited to 'network')
-rwxr-xr-xnetwork/scripts/run-os-net-config.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/network/scripts/run-os-net-config.sh b/network/scripts/run-os-net-config.sh
index 864da24b..d121fcf1 100755
--- a/network/scripts/run-os-net-config.sh
+++ b/network/scripts/run-os-net-config.sh
@@ -75,12 +75,13 @@ EOF_CAT
if [ "$mac_addr_type" != "0" ]; then
echo "Device has generated MAC, skipping."
else
- ip link set dev $iface up &>/dev/null
- HAS_LINK="$(cat /sys/class/net/${iface}/carrier)"
+ HAS_LINK="$(cat /sys/class/net/${iface}/carrier || echo 0)"
TRIES=10
while [ "$HAS_LINK" == "0" -a $TRIES -gt 0 ]; do
- HAS_LINK="$(cat /sys/class/net/${iface}/carrier)"
+ # Need to set the link up on each iteration
+ ip link set dev $iface up &>/dev/null
+ HAS_LINK="$(cat /sys/class/net/${iface}/carrier || echo 0)"
if [ "$HAS_LINK" == "1" ]; then
break
else