summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-12-23 11:16:44 +0000
committerGerrit Code Review <review@openstack.org>2016-12-23 11:16:44 +0000
commit3de4f828b49ec41c60a265208f6fb78b8f55046e (patch)
treeb2ee116e9e39ba08bf582beefe9c00b177f8354a
parentff5b7a1d35bbebe110f424b10d213facfca21dff (diff)
parent20f627c0f0a440062a8a256ec2c393c1ca22b007 (diff)
Merge "Add network_config_hook interface to run-os-net-config.sh"
-rwxr-xr-xnetwork/scripts/run-os-net-config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/network/scripts/run-os-net-config.sh b/network/scripts/run-os-net-config.sh
index 5df67b78..e65f922a 100755
--- a/network/scripts/run-os-net-config.sh
+++ b/network/scripts/run-os-net-config.sh
@@ -113,11 +113,17 @@ if [ -n '$network_config' ]; then
mkdir -p /etc/os-net-config
# Note these variables come from the calling heat SoftwareConfig
echo '$network_config' > /etc/os-net-config/config.json
+
+ if [ "$(type -t network_config_hook)" = "function" ]; then
+ network_config_hook
+ fi
+
sed -i "s/bridge_name/${bridge_name:-''}/" /etc/os-net-config/config.json
sed -i "s/interface_name/${interface_name:-''}/" /etc/os-net-config/config.json
os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
RETVAL=$?
+
if [[ $RETVAL == 2 ]]; then
ping_metadata_ip