Re: Problems with PPP on boot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi >> In your case, is Bind being started by an init script in >> /etc/init.d/? If so, perhaps you could add a new init script that >> brings up the PPPoE connection. Then, using update-rc.d, add the >> symbolic links to your script with a number that causes your PPPoE >> init script to be run before the Bind init script and any others >> that require the PPPoE link. I haven't modified any of the relevant init scripts. As far as I know the ppp daemon is started from /etc/rcS.d/S40networking (it contains command 'ifup -a' which should bring up all network interfaces, including ppp0) Other daemons (bind, ntp, ...) are started from scripts that are linked to /etc/rc2.d (S19bind, S23ntp-server, etc.). The manuals you pointed me to say that /etc/rcS.d scripts are ran before any of the /etc/rc2.d scripts. I think the problem is that S40networking runs 'ifup -a' which in turn runs pppd. pppd forks and returns immediately, which means that other boot scripts are started while the ppp is making connection in the background. Best regards Tomaz Solc -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEoPsfsAlAlRhL9q8RAr2nAJwIQeaZa+qOVYrpUbwVuIg6NhjRrwCcDKr0 HjdK+n1LlYC4nKiTFLizhKE= =9Zj5 -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Problems with PPP on boot
On Mon, Jun 26, 2006 at 06:39:25PM +0200, Tomaz Solc wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi everyone > > I have a server running Sarge that is connected to the internet through > PPPoE (I have a DSL line). I'm running several services, including DNS > (bind 8.4.6-1) and ntpd. > > When machine boots, it seems that sometimes daemons will start before > pppd manages to establish a connection. For some services like Apache > this presents no problem. But Bind and NTP will not listen for > connections coming from the internet, because the ppp0 network device > didn't exist when they were starting. This is quite a problem, because > the machine is crippled after a reboot until I manually restart Bind and > NTP. > > I have my PPP connection configured in /etc/network/interfaces like this: > > auto ppp0 > iface ppp0 inet ppp > pre-up ifconfig eth1 up > post-up waitfor ppp0 30 > post-down ifconfig eth1 down > provider dsl-provider-2.4 > > "waitfor" is a script that waits for ppp0 device to become available. > This was one of my failed attempts to try to halt the boot process until > the internet connection is established. > My understanding is that the init scripts (in /etc/init.d/) are run in sequence and that the two-digit number in the names of the symbolic links in /etc/rc1.d/, /etc/rc2.d/, etc determines the order in which the scripts in /etc/init.d/ are run. For example, S13gdm would be started before S14ppp. Take a look at these: http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-boot http://www.debian.org/doc/debian-policy/ch-opersys#s-sysvinit http://www.debian.org/doc/debian-policy/ch-opersys#s-/etc/init.d And, by the way, using Debian tools such as update-rc.d will help you manage those symbolic links. I use RoaringPenguin PPPoE, so I have my own init script (one I wrote; OK, I copied another script in /etc/init./ and made minor modifications), which brings up the PPPoE link and starts my firewall script. In your case, is Bind being started by an init script in /etc/init.d/? If so, perhaps you could add a new init script that brings up the PPPoE connection. Then, using update-rc.d, add the symbolic links to your script with a number that causes your PPPoE init script to be run before the Bind init script and any others that require the PPPoE link. Did I understand your problem correctly? Dave [snip] -- Dave Kuhlman http://www.rexx.com/~dkuhlman -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Problems with PPP on boot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone I have a server running Sarge that is connected to the internet through PPPoE (I have a DSL line). I'm running several services, including DNS (bind 8.4.6-1) and ntpd. When machine boots, it seems that sometimes daemons will start before pppd manages to establish a connection. For some services like Apache this presents no problem. But Bind and NTP will not listen for connections coming from the internet, because the ppp0 network device didn't exist when they were starting. This is quite a problem, because the machine is crippled after a reboot until I manually restart Bind and NTP. I have my PPP connection configured in /etc/network/interfaces like this: auto ppp0 iface ppp0 inet ppp pre-up ifconfig eth1 up post-up waitfor ppp0 30 post-down ifconfig eth1 down provider dsl-provider-2.4 "waitfor" is a script that waits for ppp0 device to become available. This was one of my failed attempts to try to halt the boot process until the internet connection is established. I've also tried to add scripts to /etc/ppp/ip-up.d that would restart Bind automatically after successful connection, but this only partially worked (my explanation is that sometimes bind haven't finished starting when the script in /etc/ppp/ip-up.d tries to restart it) Has anyone else had a problem like this? How can I force the boot process to stop until ppp0 becomes available? I'm also interested in why my "post-up" script in /etc/network/interfaces isn't working. It seems to be working correctly when I bring the ppp0 interface up manually with "ifup ppp0". Are these scripts started asynchronously on boot? Thanks in advance Tomaz Solc -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD4DBQFEoA29sAlAlRhL9q8RAt7aAJdgEu6Yw3jnlLCqvUwqXqZVqbH7AKCRddvo xn54xVX3JWQoLPPNEuSndQ== =2nRM -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]