[Resolvconf-devel] Bug#754381: resolveconf does not write dhcpdnsoption.tmp correctly

Olaf Till i7tiol at t-online.de
Thu Jul 10 13:08:51 UTC 2014


Package: resolvconf

Version: 1.67

Debian GNU/Linux, wheezy, ifup/down-mechanism, no network manager,
pppoe connection

Description:

/etc/ppp/ip-up.d/0001makedhcpdnsoption is supposed to write
/etc/ppp/dhcpdnsoption.tmp for the dhcp sever, but the command it
uses:

(echo -n "option domain-name-servers "; (sed -e "s/nameserver //g" < "$REALRESOLVCONF" | tr "\n" ","); echo ";") | sed -e "s/,;/;/" | sed -e "s/,/, /" > /etc/ppp/dhcpdnsoption.tmp

is wrong, since it does not account for the comment lines in
"$REALRESOLVCONF" and produces no valid option so that the dhcp server
dies.

Rather use this command (tested, working):

(echo -n "option domain-name-servers "; (sed -e "/^#.*$/d" -e "s/nameserver //g" < "$REALRESOLVCONF" | tr "\n" ","); echo ";") | sed -e "s/,;/;/" | sed -e "s/,/, /g" > /etc/ppp/dhcpdnsoption.tmp

(Note that additionally there is an added /g option for sed at the
end.)

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/resolvconf-devel/attachments/20140710/47428b18/attachment.sig>


More information about the Resolvconf-devel mailing list