> > Sorry, but I don't want to use drakconnect, it uses kppp ...
> > I want to use wvdial and I don't understand why there should be a
> > line"# ppp temp entry" in /etc/resolv.conf
> 
> net_monitor uses kppp for modem. 

But I don't want to use something that uses kppp, it's overkill.
I want to use a simple command line program such as wvdial.

> > Ok, but why to do this ?
> > When should this happen ?
> > kppp writes /etc/resolv.conf after /etc/ppp/ip-up is run and I guess
> > it deletes its entries before /etc/ppp/ip-down is run.
> > I don't know any other soft that writes "# ppp temp entry" entries.
> 
> Yep. I just wanted to say that you are not right that it doesn't work 
> currently.

I don't agree, I have no "# ppp temp entry" in /etc/resolv.conf after
Mandrake installation.
If I use wvdial to connect, that won't work.
It works currently only with something that uses kppp.
Try with wvdial, it's very simple to configure.

> After digging trough the script I agree that it is solved 
> suboptimal. If , when the option usepeerdns is set, USEPEERDNS is set,
> that should be used to prove if the DNS should be written to
> /etc/resolv.conf. The current way breaks config by hand. 

Yes, it breaks config by hand, so I'm right "that it doesn't work
currently" ;)
Quite good solution.

You would use something like this :

if [ -n "$USERPEERDNS" ]; then
    [ -n "$DNS1" ] && \
        echo -e "nameserver $DNS1 $PPP_TEMP_ENTRY" >> /etc/resolv.conf
    [ -n "$DNS2" ] && \
        echo -e "nameserver $DNS2 $PPP_TEMP_ENTRY" >> /etc/resolv.conf
fi

But USEPEERDNS test isn't needed IMHO.
If it isn't set, DNS1 and DNS2 aren't set.
Though USEPEERDNS makes the script easier to understand :)

-- 
Olivier Blin

Reply via email to