WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Improvement for pppsetup  (Read 2597 times)

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Improvement for pppsetup
« on: November 07, 2009, 04:50:57 AM »
Some people have difficulties with ppp in Tiny Core because it does not automatically detect the domain name servers.

I have found this can be rectified with minor modifications to /usr/local/bin/pppsetup in pppsetup.tcz.

Following are the modifications.


Insert at line 1216

echo "usepeerdns" >> /etc/ppp/options

so you have

echo "lock" > /etc/ppp/options
echo "defaultroute" >> /etc/ppp/options
echo "noipdefault" >> /etc/ppp/options
echo "modem" >> /etc/ppp/options
echo "/dev/$MODEM" >> /etc/ppp/options
echo "$BAUDRATE" >> /etc/ppp/options
echo "crtscts" >> /etc/ppp/options
echo "debug" >> /etc/ppp/options
echo "passive" >> /etc/ppp/options
echo "asyncmap 0" >> /etc/ppp/options
echo "usepeerdns" >> /etc/ppp/options
echo '-am' >> /etc/ppp/options


Insert at or near line 948

echo "install -m 644 /etc/ppp/resolv.conf /etc/resolv.conf" >> /etc/ppp/ip-up


Delete lines 540-559, which are:

echo "What is the IP address of your Internet provider's nameserver?" > /tmp/txtTEMP$$
echo >> /tmp/txtTEMP$$
echo "It's important that these IP numbers be correct." >> /tmp/txtTEMP$$
echo "The IP numbers should not be: 0.0.0.0" >> /tmp/txtTEMP$$
echo >> /tmp/txtTEMP$$
echo "Note: Your service provider's technical support can provide you" >> /tmp/txtTEMP$$
echo "with this information.   Example: 207.132.116.5" >> /tmp/txtTEMP$$
echo >> /tmp/txtTEMP$$

dialog --backtitle "DNS IP ADDRESS ..." --inputbox "`cat /tmp/txtTEMP$$`" 14 74 2> /tmp/rspTEMP$$

if [ $? = 1 ]; then
rm -f /tmp/*TEMP*
clear 2>/dev/null || echo
echo "PPP configuration cancelled."
exit
fi

DNSIP="`cat /tmp/rspTEMP$$`"


There are other lines which become obsolete when making these changes and should also be deleted.

Comments about the new lines could also be added.


If a new extension is made with these modifications, ppp will automatically detect the domain name servers, making it much easier.
« Last Edit: November 07, 2009, 07:52:06 AM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Improvement for pppsetup
« Reply #1 on: November 07, 2009, 10:26:40 AM »
Since you have made the changes and are able to test them it would be good if you could update the extension and submit it. 

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Improvement for pppsetup
« Reply #2 on: November 07, 2009, 05:28:46 PM »
Quote
Since you have made the changes and are able to test them it would be good if you could update the extension and submit it

I will do my best.

I can test that it works for me.

I don't know if there may be some differences in the way people connect to the internet in other parts of the world.

There are other references throughout the file to the info no longer entered when making these changes. I can delete these. However, there are 1678 lines in the original. It would be easy to miss something.


Another question asked during setup: Does your internet provider use callback? Is that still used anywhere in the world? It could probably also be deleted. Maybe it is safer to leave it in.


By the way, it works with the changes in the first post. However, there are other things which should also be deleted.
« Last Edit: November 10, 2009, 03:18:08 AM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Improvement for pppsetup
« Reply #3 on: November 08, 2009, 03:21:38 AM »

Another question asked during setup: Does your internet provider use callback? Is that still used anywhere in the world? It could probably also be deleted. Maybe it is safer to leave it in.


I have never seen a public ISP with callback, but used a lot 10 years ago to access a corporate gateway working home or travelling with ISD dial up. DIal up is mostly used novadays in US. I can imagine that such GW still exists.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."