Am Samstag, 16. August 2003 18:35 schrieb Olivier Blin:
> Hi,
>
> I've found some weird things in /etc/ppp/ip-up
>
> 1) what's this trick for PPP_TEMP_ENTRY ?
> # for dynamic DNS support with gnome-ppp and kppp and draknet
> if grep -i '#.*ppp temp entry' /etc/resolv.conf >& /dev/null ; then
>     PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \
>        tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' `
> else
>     unset PPP_TEMP_ENTRY
> fi
> Why use this grep | tail | sed ? The result should always be "# ppp temp
> entry"

well , dunno

> 2) kppp now writes temp entries in /etc/resolv.conf after /etc/ppp/ip-up
> is run, gnome-ppp isn't supported anymore, and drakconnect uses kppp (it
> even run it as root ...), so there is no need to check for "#.*ppp temp
> entry" here ...
> "grep -i '#.*ppp temp entry' /etc/resolv.conf" will never match here.
> So PPP_TEMP_ENTRY will never be set.

If kppp does it and  PPP_TEMP_ENTRY is not set, isn't it right ? Otherwise the 
nameservers would be written two times in there, wouldn't it ? Why do you 
think it will never match ? because the # ppp temp entry is not set in this 
case ? 

> 3) Since PPP_TEMP_ENTRY is always unset, the script never writes DNS in
> /etc/resolv.conf
> This is a problem when pppd or wvdial are used to establish the
> connection.
>
> if [ -n "$PPP_TEMP_ENTRY" ]; 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

true

> I propose to drop all this "if grep -i '#.*ppp temp entry'
> /etc/resolv.conf" and "if [ -n "$PPP_TEMP_ENTRY" ]" blocks and to
> replace them with :
>
> PPP_TEMP_ENTRY="# ppp temp entry"
> [ -n "$DNS1" ] && \
>     echo -e "nameserver $DNS1 $PPP_TEMP_ENTRY" >>/etc/resolv.conf
> [ -n "$DNS2" ] && \
>     echo -e "nameserver $DNS2 $PPP_TEMP_ENTRY" >> /etc/resolv.conf
>
>
> Have I missed something ?
> For dialup users, with the current ip-up script, only kppp sets dynamic
> DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) ...

Hmmm 
Your complain is that for modem use only kppp works ? 

If drakconnect sets this entry normally in /etc/resolv.conf and doesn't do 
that for modem since it is supposed to work with kppp it is sure a bug. 

I have a bit the feeling I don't understand what you want to say, but thats Ok 
I guess ;) 

Steffen

Reply via email to