ot; ];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
set +e
os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
RETVAL=$?set -e
if[[$RETVAL==2]];then
ping_metadata_ip
#NOTE: dprince this udev rule can apparently leak DHCP processes?# https://bugs.launchpad.net/tripleo/+bug/1538259# until we discover the root cause we can simply disable the# rule because networking has already been configured at this pointif[ -f /etc/udev/rules.d/99-dhcp-all-interfaces.rules ];then
rm /etc/udev/rules.d/99-dhcp-all-interfaces.rules
fielif[[$RETVAL !=0]];thenecho"ERROR: os-net-config configuration failed." >&2exit1fifi