Hi,
this is - i think - the relevant section from my ip-up script.
I'm a bloody beginner so I don't know if I should uncomment
all of this o only a part of it. I've read it through and through,
but it won't help.
Thanks Tom
# Analog-PPP, add commands as you need...
case "$BASENAME" in
ip-up)
#
# This code allows automatic configuration of your resolv.conf
# for peer supplied DNS addresses when using the `usepeerdns'
# option. Original resolv.conf is restored when ip-down is called
# by pppd when the link goes down.
#
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
rm -f /etc/ppp/resolv.prev
if [ -f /etc/resolv.conf ]; then
cp -p /etc/resolv.conf /etc/ppp/resolv.prev
grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
cat /etc/ppp/resolv.conf /etc >> /etc/resolv.conf
echo "Modified /etc/resolv.conf for DNS at $INTERFACE"
else
cp /etc/ppp/resolv.conf /etc
chmod 644 /etc/resolv.conf
echo "Installed /etc/resolv.conf for DNS at
$INTERFACE"
fi
if [ "$START_NSCD" = yes ]; then
/sbin/init.d/nscd restart &
fi
fi
test -x /etc/ppp/ip-up.local && /etc/ppp/ip-up.local $*
;;
ip-down)
#
# This code restores the original resolv.conf saved when ip-up
# was called by the pppd which uses the `usepeerdns' option and
# resolv.conf was modified for the supplied dns server adresses.
#
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
if [ -f /etc/ppp/resolv.prev ]; then
cp -fp /etc/ppp/resolv.prev /etc/resolv.conf
echo "Restored original /etc/resolv.conf"
else
rm -f /etc/resolv.conf
echo "Deinstalled /etc/resolv.conf"
fi
if [ "$START_NSCD" = yes ]; then
/sbin/init.d/nscd restart &
fi
fi
test -x /etc/ppp/ip-down.local && /etc/ppp/ip-down.local $*
;;
*)
;;
esac
;;
*)
# dont know...
;;
esac | logger -t $BASENAME
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 21:00:32 EST