Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-05 Thread Pigeon
On Thu, Nov 04, 2004 at 01:15:00PM -0600, John Hasler wrote:
 Pigeon writes:
  Also worth checking /etc/ppp/ip-up.d/000usepeerdns which ought to be
  detecting that you've used pppconfig and leaving all the work to
  .../0-dns-up.
 
 Here is usepeerdns-up:
snip

Ah, things have changed. I was thinking of 000usepeerdns on woody,
which begins:

#!/bin/sh

# usepeerdns by Eduard Bloch, 12 Sep 2001.

# pppconfig is installed, it will do the job

test -f /etc/ppp/ip-up.d/0dns-up -a -f /usr/sbin/pppconfig  exit 0


-- 
Pigeon

Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x21C61F7F


signature.asc
Description: Digital signature


Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-05 Thread Paul Dufresne
Thanks for your help.
First, I now understand that /etc/resolv.conf is dynamically created
when using usepeerdns option of pppd.
It took me some time, because I had others things to do.
It turned out that Firestarter have created an ip-up.local file, that was
stopping ip-up script. I guess I should fill a bug report against
Firestarter (firewall program).
/etc/ppp/ip-up script have this:
===
if [ -x /etc/ppp/ip-up.local ]; then
 exec /etc/ppp/ip-up.local
fi
echo 'ipuping3'  /etc/ppp/ipup.log  ; Added by me to help me find the bug
run-parts /etc/ppp/ip-up.d \
 --arg=$1 --arg=$2 --arg=$3 --arg=$4 --arg=$5 --arg=$6
===
And /etc/ppp/ip-up.local was this:
===
PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
sh /etc/firestarter/firewall.sh
PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
sh /etc/firestarter/firewall.sh
PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
sh /etc/firestarter/firewall.sh
===
Renaming it to /etc/ppp/ip-up.local.old have made /etc/resolv.conf to be
dynamically created. But I don't tried to use Firestarter since this change.
---Paul

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-05 Thread Paul Dufresne
Well, before filling a new bug, I searched bugs on Firestarter package and
found that bug #277496 is already there (for 16 days long) describing
the problem of using /etc/ppp/ip-up.local, and the maintainer of the package
working on a patch for this.
--Paul

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-04 Thread Paul Dufresne
I use a dialup modem to connect to Internet.
I use pppconfig to configured my provider connection.
In advanced setting, nameservers, I have chosen dynamic.
But I need to use /etc/resolv.conf with a nameserver line to be
able to use Internet.
I had forgotten this for a long time, but a recent update (I had this
problem even with stable, but now I use testing, with a bit of
unstable for mono), have made my /etc/resolv.conf become an
empty file, and I had to refill it with nameserver lines.
I guess I was expecting this to be an obvious bug, that most people would 
know
and that would be fixed fastly. But now, I wonder. I have just check in the
bugs for ppp package, and this don't seem to be there.

I would expect /etc/resolv.conf to have no effect at all, since I can see in 
the
logs that my ISP does indeed return DNS information (that's where I took
it to fill my /etc/resolv.conf file), and my provider setting is indeed on 
dynamic.

What should I do with this? If I should fill a bug report, what is the best
package to fill it on?
--Paul

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-04 Thread Wayne Topa
Paul Dufresne([EMAIL PROTECTED]) is reported to have said:
 I use a dialup modem to connect to Internet.
 I use pppconfig to configured my provider connection.
 In advanced setting, nameservers, I have chosen dynamic.
 But I need to use /etc/resolv.conf with a nameserver line to be
 able to use Internet.
 I had forgotten this for a long time, but a recent update (I had this
 problem even with stable, but now I use testing, with a bit of
 unstable for mono), have made my /etc/resolv.conf become an
 empty file, and I had to refill it with nameserver lines.
 
 I guess I was expecting this to be an obvious bug, that most people would 
 know
 and that would be fixed fastly. But now, I wonder. I have just check in the
 bugs for ppp package, and this don't seem to be there.
 
 I would expect /etc/resolv.conf to have no effect at all, since I can see 
 in the
 logs that my ISP does indeed return DNS information (that's where I took
 it to fill my /etc/resolv.conf file), and my provider setting is indeed on 
 dynamic.
 
 What should I do with this? If I should fill a bug report, what is the best
 package to fill it on?
 

Don't know if you have installed the resolvconf package or not but
that package does take care of, what I tink I understand, you problem
is.

Description: Nameserver information manager
 Resolvconf is a framework for keeping track of the system's
 information about currently available nameservers. It sets
 itself up as the intermediary between programs that supply
 nameserver information and programs that use nameserver
 information. Examples of programs that supply nameserver
 information are: ifupdown, DHCP clients, the PPP daemon and
 local nameservers. Examples of programs that use this
 information are: DNS caches, resolver libraries and the
 programs that use them.
 .
 This package may require some manual configuration.  Please
 read the README file for detailed instructions.

NOTE: Conflicts: pppconfig ( 2.3.1)

HTH=Hope This Helps, YMMV=Your Mileage May Vary, HAND=Have A Nice Day

Wayne

-- 
It is easier to write an incorrect program than understand a correct
one.
___


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-04 Thread Pigeon
On Thu, Nov 04, 2004 at 03:03:00PM +, Paul Dufresne wrote:
 I use a dialup modem to connect to Internet.
 I use pppconfig to configured my provider connection.
 In advanced setting, nameservers, I have chosen dynamic.
 But I need to use /etc/resolv.conf with a nameserver line to be
 able to use Internet.
 I had forgotten this for a long time, but a recent update (I had this
 problem even with stable, but now I use testing, with a bit of
 unstable for mono), have made my /etc/resolv.conf become an
 empty file, and I had to refill it with nameserver lines.
 
 I guess I was expecting this to be an obvious bug, that most people would 
 know
 and that would be fixed fastly. But now, I wonder. I have just check in the
 bugs for ppp package, and this don't seem to be there.
 
 I would expect /etc/resolv.conf to have no effect at all, since I can see 
 in the
 logs that my ISP does indeed return DNS information (that's where I took
 it to fill my /etc/resolv.conf file), and my provider setting is indeed on 
 dynamic.
 
 What should I do with this? If I should fill a bug report, what is the best
 package to fill it on?

Choosing dynamic nameservers in pppconfig should mean that you
automatically get a new resolv.conf written when the connection comes
up. This is done by the script /etc/ppp/ip-up.d/0dns-up which you can
follow through and check that it is in fact possible to do what the
script wants to do. Also worth checking /etc/ppp/ip-up.d/000usepeerdns
which ought to be detecting that you've used pppconfig and leaving all
the work to .../0-dns-up.

-- 
Pigeon

Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x21C61F7F


signature.asc
Description: Digital signature


Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-04 Thread John Hasler
Paul Dufresne writes:
 In advanced setting, nameservers, I have chosen dynamic.

Your ISP supports this?  Not all do.

 I had forgotten this for a long time, but a recent update (I had this
 problem even with stable, but now I use testing, with a bit of unstable
 for mono), have made my /etc/resolv.conf become an empty file, and I had
 to refill it with nameserver lines.

The scripts installed by pppconfig and enabled when you select dynamic
save resolv.conf when ppp comes up and install a new resolv.conf containing
the namservers supplied by your ISP.  When ppp goes down the scripts put
the old resolv.conf back.

What does resolv.conf contain when ppp is up?  What does it contain when
ppp is down?  Do you having anything else that messes with resolv.conf
installed such a a dhcp client or a VPN client?


In practice ISPs rarely change their nameservers.  The reason they use
the dynamic scheme is to make configuration easier for users by
eliminating the need to enter nameserver IP numbers.
-- 
John Hasler


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: ppp dynamic dns need /etc/resolv.conf to work, a bug?

2004-11-04 Thread John Hasler
Pigeon writes:
 Also worth checking /etc/ppp/ip-up.d/000usepeerdns which ought to be
 detecting that you've used pppconfig and leaving all the work to
 .../0-dns-up.

Here is usepeerdns-up:

#!/bin/sh -e

# this variable is only set if the usepeerdns pppd option is being used
[ $USEPEERDNS ] || exit 0

# exit if the resolvconf package is installed
[ -x /sbin/resolvconf ]  exit 0

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

# follow any symlink to find the real file
REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)

# merge the new nameservers with the other options from the old configuration
{
  cat /etc/ppp/resolv.conf
  grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF || true
}  $REALRESOLVCONF.tmp

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

# tell nscd that the file has changed
[ -x /usr/sbin/nscd ]  /usr/sbin/nscd -i hosts || true

exit 0


And usepeerdns-down:

#!/bin/sh -e

# exit if the resolvconf package is installed
[ -x /sbin/resolvconf ]  exit 0

# follow any symlink to find the real file
if [ -e /etc/resolv.conf ]; then
  REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
else
  REALRESOLVCONF=/etc/resolv.conf
fi

# if an old resolv.conf file exists, restore it
if [ -e $REALRESOLVCONF.pppd-backup ]; then
  mv -f $REALRESOLVCONF.pppd-backup $REALRESOLVCONF

  # tell nscd that the file has changed
  [ -x /usr/sbin/nscd ]  /usr/sbin/nscd -i hosts || true
fi

exit 0


-- 
John Hasler


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]