From: Michael Prokop Date: Sun, 9 Feb 2014 21:28:24 +0000 (+0100) Subject: netcardconfig: avoid dns-nameservers leaking into gateway variable X-Git-Tag: v0.8.0~3 X-Git-Url: http://git.grml.org/?p=grml-network.git;a=commitdiff_plain;h=606f7cc69955a8e815699484feb491d8dd940fbd netcardconfig: avoid dns-nameservers leaking into gateway variable Because we also take care of the dns-nameservers entry in /etc/network/interfaces, when re-executing netcardconfig we overload the default gateway variable with *also* the dns-nameservers entry, which is clearly unwanted. So avoid leaking the dns-nameservers entry into the gateway variable (which is presented in the gateway input dialog) by assigning it its own variable. --- diff --git a/sbin/netcardconfig b/sbin/netcardconfig index 3489785..7124b53 100755 --- a/sbin/netcardconfig +++ b/sbin/netcardconfig @@ -442,7 +442,7 @@ configiface() { /gateway/{if(found){gateway=$NF}} /dns-nameservers/{if(found){dnsnameservers=$NF}} END{print address" "netmask" "broadcast" "gateway" "dnsnameservers}' /etc/network/interfaces >"$TMP" - read IP NM BC DG <"$TMP" + read IP NM BC DG NS <"$TMP" rm -f "$TMP" fi