On Sunday 09 January 2005 00:57, Ilya Konstantinov wrote: > solomon wrote: > >I still have no idea why the default route doesn't get set up > > automatically (as it did on my previous computer). > > IIRC, the 'defaultroute' option of pppd always came as a patch. Some > distros integrate this patch while others prefer to implement it as a > script in /etc/ppp/ip-up.d/ directory. Debian's approach uses the later, > IMO.
You could be right, although: 1 - I use Mandrake and not Debian 2 - I did move from MDK10.0 to MDK10.1, but I doubt that this would have changed. 3 - I didn't find anything in /etc/ppp/ip-up.d/ directory (but, of course it could be somewhere else on Mandrake) BTW - I noticed that in my previous post I sent an old version of my script to set the default route. Here's an improved version that solves the problem of the inet IP sometimes being a slightly different length, so I delete whitespace from the beginning and then pad extra whitespace before the P-t-P address, before splitting the file. #!/bin/bash ## create route command after running pptp ## get the IP addresses and remove extra text ifconfig | grep P-t-P | sed 's/inet addr://; s/Mask:255.255.255.255//; s/P-t-P://' > /tmp/tst-IP # delete leading whitespace (spaces, tabs) from front of the line sed 's/^[ \t]*//' < /tmp/tst-IP > /tmp/tst-IP1 # add whitespace before IP address sed 's/ 212./ 212./' < /tmp/tst-IP1 > /tmp/tst-IP2 ## cut out the inet address so only the P-t-P address is left /home/solomon/bin/splitpea -s --bytes=20 /tmp/tst-IP2 ## set an ENV variable MYIP=`cat /tmp/tst-IP2.002` ## create executable script echo "#!/bin/bash" > /home/solomon/bin/myroute echo "route add -net default gw" $MYIP "ppp0" >> /home/solomon/bin/myroute chmod +x /home/solomon/bin/myroute ## and run it /home/solomon/bin/myroute -- Shlomo Solomon http://come.to/shlomo.solomon Sent by KMail 1.7.1 (KDE 3.2.3) on LINUX Mandrake 10.1 ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
