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]