Re: RFC: ipw3945-daemon
On Sun, Oct 22, 2006 at 08:57:25PM +0200, Marco d'Itri wrote:
> jurij@wooyd.org wrote:
>
> >> No, I think modprobe directives are more appropriate for this task.
> >> You need a script anyway to change the sysfs permissions, create the
> >> /var/run/ directory, etc. So it can as well wait for the sysfs files to
> >> appear. Let me know if you have more doubts.
> >Ok, it took me a while to figure out that the daemon could not be
> >started early in the boot process because at the time udev modprobes
> >the drivers, the filesystem is still read-only (including /var), so it
> >can't write its PID file. It is possible to work around it by using
> >/lib/init/rw as the location of the PID file, do you think this is an
> >acceptable solution?
> You need /var/log/ anyway for the log file, so I suggest that you make
> the script wait until /var has been mounted rw.
I tried doing that, and ran into the problem with pid file. If I just
wait for the /var/run to become writable, and start the daemon, the
pid file is removed later in boot process when S36mountall-bootclean
is run. I can wait for /var/run/.clean to be created, but bringing up
the network interfaces happens soon after that, so there is a
potential for all kinds of race conditions. I think that the best way
to make it more robust is to go back to having a regular /etc/init.d
file, which will both run at boot time and can be called from modprobe
(in that case it will just do nothing if the filesystem is not
writeable).
Best regards,
--
Jurij Smakov jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
Reply to: