From ce806a065e0df8640a6408d63c42b0dbb951043d Mon Sep 17 00:00:00 2001 From: Mikhail Efremov Date: Tue, 23 Jan 2024 21:11:06 +0300 Subject: [PATCH] Fix write_systemd_networkd_bootproto() Logic in this function was inverted (but it worked anyway). See ALT bug #49159. --- alterator-net-functions/alterator-net-functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alterator-net-functions/alterator-net-functions b/alterator-net-functions/alterator-net-functions index 73c8f25..2735b8b 100644 --- a/alterator-net-functions/alterator-net-functions +++ b/alterator-net-functions/alterator-net-functions @@ -1170,21 +1170,21 @@ write_systemd_networkd_bootproto() ipv6_gateway="$(read_iface_default_gw "$cachedir" 6)" fi - first_value_flag= + first_value_flag=1 for addr in $ipv4_addresses $ipv6_addresses; do if [ -n "$first_value_flag" ]; then write_systemd_networkd_ini_option "$network_filename" "Network" "Address" "$addr" - first_value_flag=1 + first_value_flag= else add_systemd_networkd_ini_option "$network_filename" "Network" "Address" "$addr" fi done - first_value_flag= + first_value_flag=1 for gw in $ipv4_gateway $ipv6_gateway; do if [ -n "$first_value_flag" ]; then write_systemd_networkd_ini_option "$network_filename" "Network" "Gateway" "$gw" - first_value_flag=1 + first_value_flag= else add_systemd_networkd_ini_option "$network_filename" "Network" "Gateway" "$gw" fi