Am Donnerstag 28 April 2005 18:57 schrieb Oliver Kurth:

> > But sometimes - I do not yet get when and why - it doesn't wait. In this
> > case it starts guessnet, but then goes on immediately without waiting
> > for guessnet to complete the detection of the network environment. This
> > looks like this:
>
> Well, this is not a bug. ifplugd's purpose is to run as a daemon, and
> bring up an interface whenever you plug in a cable. This means your
> setup should also work when you boot your laptop without a cable plugged
> in, and plug it in some time later - at that time it should do your
> guessnet work, which in turn does pppoe or dhcp. It won't work, right?
> So if you solve that problem, you will also solve your original
> problem ;-).

Hello Oliver,

hmmm, of course. Now I remember placing some chrony script 
in /etc/network/if-up.d in order to switch chrony online when a network is 
detected on my private laptop.

But still I do not understand why usually /etc/init.d/ifplugd waits until ifup 
has finished the interface configuration and sometimes it does not. Given 
your explaination it shouldn't wait at all or when "-w" is given not longer 
than the time required to complete the link beat detection. Well I tried it 
quite often and usually /etc/init.d/ifplugd actually waits till that 15 
seconds have passed before it exits. So I see some inconsistency in the 
behavior of /etc/init.d/ifplugd / ifplugd that is not well explained.

As outlined below about ntpdate such a waiting behaviour might still be quite 
nice as an option. At least it would ease transition to ifplugd (as most 
Debian packages are not prepared to place scripts in /etc/network/if-up.d it 
seems), but then it has the drawback that one has to wait for timeouts, so I 
understand it when ifplugd doesn't wait. 

Well it seems this issue really needs some thought. Probably it would be good 
to file bug reports for network service related packages that have 
no /etc/init.d/if-up.d and /etc/init.d/if-down.d scripts that operate well 
with the usual boot sequence init script calling procedure. 

> ifplugd calls (by default) ifup <iface>. ifup will use the scripts
> in /etc/network/if-up.d/ and *that* is where you have to start all
> services that depend on that interface. This will also work at boot
> time.

Ok, I understand. But there is still some problems as the notebook setup I 
work on is a little bit more complex:

1) Time synchronisation is done by first running ntpdate (from ntp-simple) on 
startup, so that bigger gaps are corrected immediately and then ntpd to keep 
the time up-to-date. Now putting this into /etc/network/if-up.d/ is not that 
nice as there might occur bigger time adjustments when a network cable is 
inserted in the case the system time of the notebook and the ntp time differ 
quite much. Restarting ntpd should be no problem, but for ntpdate I would 
need a different solution so that it is only started during boot up, but 
after network interface configuration has finished and before ntpd is 
started.

2) As I understand when I start a service that depend on the interface 
in /etc/network/if-up.d I probably should remove its start on boot up via 
update-rc.d. But what with services like cups that also work without a 
network. Best would probably to start them at boot time and restart them when 
a network interface has been upped.

Regards,
-- 
Martin Steigerwald                            Mail: [EMAIL PROTECTED]
Systemadministrator                           Fon:  +49 (0)911 30999-0
team(ix) GmbH                                 Fax:  +49 (0)911 30999-99
Süd-West-Park 35, 90449 Nürnberg, Deutschland

Reply via email to