From eb9faedad5aa04a4abf3e589cf5f2f7def454ae6 Mon Sep 17 00:00:00 2001 From: Nate Johnston Date: Mon, 2 Dec 2019 10:12:46 -0500 Subject: [PATCH] Fix sed in run-os-net-config to only replace values, not keys The sed in run-os-net-config.sh replaces all instances of bridge_name but it should only replace values, not keys. Change-Id: Iaf19e1550bd7a5286b8512596efd84cf14c78f32 Closes-bug: #1854780 (cherry picked from commit 858cc6c54f690058ce28b0832870df875a7923e9) --- network/scripts/run-os-net-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/scripts/run-os-net-config.sh b/network/scripts/run-os-net-config.sh index 22085cabd4..026e5d9bb0 100755 --- a/network/scripts/run-os-net-config.sh +++ b/network/scripts/run-os-net-config.sh @@ -137,7 +137,7 @@ if [ -n '$network_config' ]; then network_config_hook fi - sed -i "s/bridge_name/${bridge_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 set +e