linux-l: pppd - dynamische DNS-Adressen
Jan-Benedict Glaw
jbglaw at lug-owl.de
Mo Aug 14 00:56:56 CEST 2000
On Sun, Aug 13, 2000 at 07:33:09PM +0200, Rolf Buenning wrote:
Hallo Rolf!
> On Son, Aug 13, 2000 at 02:59:44 +0200, Jan-Benedict Glaw wrote:
> > On Sat, Aug 12, 2000 at 09:17:47PM +0200, Rolf Buenning wrote:
> > > Bei DNS1 stimmt es, aber DNS2 ist leer.
> [...]
>
> Es bleibt dabei, ueber DNS2 bekomme ich nichts. :-(
> Koennte es daran liegen, dass remote statt ms-dns2 ...-dns3 uebergibt
> und der pppd damit nichts anfangen kann?
> Koenntest du mal nachsehen, was bei dir uebergeben wird?
Klaro. Ich bekomme auch ms-dns1 und ms-dns3 -- kein ms-dns2.
> Und wie? Es ist zwar nicht sehr schwierig (SuSE hat auch ein
> Beispielscript), aber wuerdest du mir mal da komplette script (oder den
> Teil mit der /etc/resolv.conf) mailen(PM)?
Ich häng's einfach mal an...
MfG, JBG
--
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <jbglaw at lug-owl.de> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
"insmod vi.o and there we go..." (Alexander Viro on linux-kernel)
-------------- nächster Teil --------------
#!/bin/sh
# 0dns-up by John Hasler 4 Apr 1999. You may treat this program as if it
# was in the public domain.
# Rev. Dec 22 1999 to put dynaminc nameservers last.
# 0dns-up sets up /etc/resolv.conf for the provider being connected to. In
# conjunction with pppd's usepeerdns option it also handles dynamic dns.
# It expects to be passed the provider name in PPP_IPPARAM.
# If pppconfig has been removed we are not supposed to do anything.
test -f /usr/sbin/pppconfig || exit 0
PROVIDER="$PPP_IPPARAM"
ETC="/etc"
PPPRESOLV="$ETC/ppp/resolv"
TEMPRESOLV="$ETC/resolv.conf.ppp.temp$$"
RESOLVBAK="$ETC/resolv.conf.ppp.bak"
RESOLVCONF="$ETC/resolv.conf"
# We better not do anything if resolv.conf.bak already exists.
test -f "$RESOLVBAK" && exit 0
# Put the resolv.conf for this provider (if it exists) in a temp file.
# If we are using dynamic dns it will be empty or contain any resolver
# options the user added. Otherwise it will be a complete resolv.conf for
# this provider.
test -f "$PPPRESOLV/$PROVIDER" && cat $PPPRESOLV/$PROVIDER > $TEMPRESOLV
# USEPEERDNS, DNS1, and DNS2 are variables exported by pppd. Do we have
# usepeerdns and a couple of nameservers? If so, put a couple of
# nameserver lines in the temp file.
if [ "$USEPEERDNS" ] && [ "$DNS1" ] ; then
echo -e "\nnameserver $DNS1" >> $TEMPRESOLV
if [ "$DNS2" ] ; then
echo -e "\nnameserver $DNS2" >> $TEMPRESOLV
fi
fi
# If we haven't created TEMPRESOLV by now, just exit.
test -f $TEMPRESOLV || exit 0
# Back up resolv.conf.
cp $RESOLVCONF $RESOLVBAK
# And replace it with the new resolv.conf from the temp file.
mv $TEMPRESOLV $RESOLVCONF
chmod 644 $RESOLVCONF
exit 0
-------------- nächster Teil --------------
#!/bin/sh
# 0dns-down by John Hasler 4 Apr 1999. You may treat this program as if it
# was in the public domain.
# 0dns-down takes down what 0dns-up sets up.
# If pppconfig has been removed we are not supposed to do anything.
test -f /usr/sbin/pppconfig || exit 0
ETC="/etc"
RESOLVBAK="$ETC/resolv.conf.ppp.bak"
RESOLVCONF="$ETC/resolv.conf"
test -f "$RESOLVBAK" && mv $RESOLVBAK $RESOLVCONF
chmod 644 $RESOLVCONF
exit 0
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 240 bytes
Beschreibung: nicht verfügbar
URL : <https://mlists.in-berlin.de/pipermail/linux-l-mlists.in-berlin.de/attachments/20000814/e693c9ef/attachment.sig>
Mehr Informationen über die Mailingliste linux-l