Package: ppp
Version: 2.4.9-1+1

There is still another bug in /etc/ppp/ip-*.d/0000usepeerdns .

Let's say the user starts with a clean system,
no /etc/resolv.conf file.

Well, due to the logic in /etc/ppp/ip-*.d/0000usepeerdns,
he will be left with a zero byte /etc/resolv.conf for the rest of his
life, after the pppd program finishes:

# create the file if it does not exist
if [ ! -e /etc/resolv.conf ]; then
  : > /etc/resolv.conf
fi

...

# backup the old configuration and install the new one
cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"
mv -f "$REALRESOLVCONF.tmp" "$REALRESOLVCONF"

Ah, but the "old configuration" might not be so old at all. It in fact
might very much be simply the result of
  : > /etc/resolv.conf
above!

(Which gets "restored" by the ip-down.d/ script.)

This new empty /etc/resolv.conf indeed, the next and following days, is
"the old configuration". But on the first day, it certainly was not. On
the first day the old configuration was no configuration.

(Does this all hurt much? Well no, because while pppd is running the
empty file is moved to the TMP file name. So one could say 'Well you are
offline anyway when the "permanent" /etc/resolv.conf is present.')

Reply via email to