[Pkg-sysvinit-devel] Writing a pid file early during boot
Henrique de Moraes Holschuh
hmh at debian.org
Tue Dec 12 03:35:06 CET 2006
On Mon, 11 Dec 2006, Jurij Smakov wrote:
> I maintain a daemon, which may be started in two different ways: on
> loading of a kernel module (via a modprobe hook) and in a usual way by
> init script (during boot). The problem is that when udev triggers the
> loading of the module early in the boot process (in
> /etc/rcS.d/S03udev), the filesystem may still be mounted read-only, so
As you said yourself, you need to stop doing such things on coldplug, and do
they later. This is a generic problem of all async userspace stuff
(anything hanging off udev and friends), and needs a generic solution.
I suggest starting a work thread on d-devel or on this list, or even on the
initscripts-ng project in alioth.debian.org, call in the udev maintainer,
and let's get to work.
> So, to resolve the problem I need some indicator, which would allow me
> to tell reliably whether the S36mountall-bootclean.sh has been run
> already. Then my init script could check for that condition when
Well, to me it looks like what your package (and others like it) need to be
able to know what the system state is (early init, coldplug, early
userspace, normal userspace boot, normal userspace) and to be able to
schedule itself to run later if it is too early yet to do your thing.
> do that by checking the status of some flag file in /lib/init/rw,
> touched only by the init script's, which runs after
That's a possible solution to the problem, yes. I am not sure if it would
solve the entire problem, though.
IMO we probably need the system state and hooks. /lib/init/rw allows us to
implement that.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
More information about the Pkg-sysvinit-devel
mailing list