diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-12-21 09:36:29 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-12-21 09:36:29 +0000 |
commit | aed9e1b9c14058efc5fbdd41025fd688039ecf3b (patch) | |
tree | 10a6fa5f13a4922a09f91cd89d1283486d96cfa9 | |
parent | b9cab21630a79d57594a7b5cedf28439df794047 (diff) | |
parent | c6f4d5bf908683600ed646be7ab5e1ab96d9b15b (diff) |
Merge "net-conf: make bridge and interface name optional"
-rwxr-xr-x | network/scripts/run-os-net-config.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/network/scripts/run-os-net-config.sh b/network/scripts/run-os-net-config.sh index fc1e6d54..5df67b78 100755 --- a/network/scripts/run-os-net-config.sh +++ b/network/scripts/run-os-net-config.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Note this script expects the following environment variables to be set -# normally these are provided by the calling SoftwareConfig resource, but -# they may also be set manually for testing +# The following environment variables may be set to substitute in a +# custom bridge or interface name. Normally these are provided by the calling +# SoftwareConfig resource, but they may also be set manually for testing. # $bridge_name : The bridge device name to apply # $interface_name : The interface name to apply # @@ -113,8 +113,8 @@ 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 - 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 + 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=$? |