[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Stopping daemons from starting on install

> When one installs a package containing a daemon of some sort, it is
> usually started up automatically. Debootstrap gets over that by
> installing a fake start-stop-daemon that doesn't actually do the job,
> but is there a better way of disabling this behaviour when packages are
> installed / updated? I'm building an embedded system and I chroot into
> its root directory and perform installs / updates using the standard
> tools, but I don't want the freshly installed / updated daemons starting
> up on my host system.
> Has anybody done this before?

I have the same problem, for the same reason, using the Debian tools under
chroot. I wish there was an option or something like that to would disable
daemon restarting, but I could not find any. O will give you my experience
with this below. Please note that it is all Woody-based.

Most of the time this is not in fact a serious problem, because when /proc
is not mounted start-stop-daemon will detect this fact and exit gracefully
with a warning message, but without starting or stopping any daemons. When
this happens the package tools will not crash, but just finish their jobs.

Note, however, that you should cover up /var/run with a masking mount, so
that the package tools cannot find any PID files there.  If you do not do
this it is possible that some process will suddenly die off in the server
because its pid happened to show up in one such file. This seems unlikely
but it has happened, with unpleasant consequences.

There are, however, some packages which have poorly written init scripts,
which may give you trouble even if /proc is not mounted.  The only case I
know about right now is the rwhod package, because it uses in its init.d/
script the start-stop-daemon program without defining a PID file. In this
case the start-stop-daemon program works like killall, and exits in error
when /proc is not mounted, causing the package tools to crash.

I have not had this kind of trouble with any other packages so far.


        Jorge L. deLyra,  Associate Professor of Physics
            The University of Sao Paulo,  IFUSP-DFMA
       For more information: finger delyra@latt.if.usp.br

Reply to: