[Pkg-sysvinit-devel] invoke-rc.d outside maintainer scripts

Marc Haber mh+pkg-sysvinit-devel at zugschlus.de
Sat May 12 18:40:11 UTC 2012


On Fri, Jun 11, 2010 at 10:26:25AM -0300, Henrique de Moraes Holschuh wrote:
> On Thu, 10 Jun 2010, Timo Juhani Lindfors wrote:
> > Henrique de Moraes Holschuh <hmh at debian.org> writes:
> > > NO.  invoke-rc.d is for package maintainer script use.  It shouldn't be used
> > > anywhere else.  It is bad enough the amount of crap that happens at shutdown
> > > because people started misusing it inside ifup/ifdown.d, etc.

The manpage of invoke-rc.d does not contain this information. It only
says that "All access to the init scripts by Debian packages'
maintainer scripts should be done through invoke-rc.d." and does not
say that it should not be used outside a maintainer script.

Additionally, I see a lot of use cases where it would be useful to
re(load|start) a service iff it should be running in the current
runlevel. invoke-rc.d offers a way to elegantly do this, which is a
reason for it being (ab)used outside of maintainer scripts.

> > Btw, after installing gnome I now get daily email from my
> > /etc/policy-rc.d since /etc/cron.d/anacron uses invoke-rc.d:
> > 
> > 30 7    * * *   root    test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null
> > 
> > Is this a bug in anacron? Surely this is not a maintainer script?
> 
> It looks fishy as all heck, yes.  Looks like both the initscript AND
> invoke-rc.d are being abused at first glance.

What should the package be doing instead?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062



More information about the Pkg-sysvinit-devel mailing list