Skip to content

Commit

Permalink
netcardconfig: avoid dns-nameservers leaking into gateway variable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mika committed Feb 9, 2014
1 parent d15340e commit 606f7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sbin/netcardconfig
Expand Up @@ -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

Expand Down

0 comments on commit 606f7cc

Please sign in to comment.