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

Bug#591791: [PATCH] Document generic and upstart-specific init-system requirements



Russ Allbery wrote:

> That seems like a feature, not a bug, in the case of configuration
> installed by Debian packages such as what's cited in this part of the
> thread.  If I have a policy rule that says not to run that init script, I
> mean it, and I don't want ifup running it anyway.

It's just plain not clear to me what policy-rc.d should and should not
be able to do.  The "do nothing and pretend you did something"
semantics, while they work ok in the context of post-installation
scripts that may or may not start the just-configured daemon, are
always going to feel a little weird in general because they break the
patterns

	start daemon &&
	interact with daemon

and

	stop daemon &&
	perform an action that uses a port normally used by daemon

and

	edit configuration file &&
	reload daemon configuration

Example for context:

  http://bugs.debian.org/445203#50

Which points to:

  http://bugs.debian.org/588085

> Jonathan Nieder <jrnieder@gmail.com> writes:

>> Another downside is that invoke-rc.d is Debian-specific.
>
> So are the network hooks under discussion.

I think the former is relevant and the latter isn't.  That may seem
odd, so let me mention a couple of examples of fallout.

 1. Suppose my (upstream) package wants to detect some network
    state and reconfigure itself when an interface goes up or down.
    So I provide a script that writes a file and runs
    "/etc/init.d/mydaemon reload" and say "Please run this when
    bringing up or down an interface".

    If policy mandates that ifup hooks use invoke-rc.d instead, my
    script cannot be used as-is in the Debian packaging.

 2. Suppose my (non Debian derived) operating system needs some
    infrastructure to bring up and down network interfaces,
    configuring them appropriately.  I notice ifupdown and like how
    it works and port it to my OS.

    Now if someone's (upstream) package notices that
    /etc/network/if-up.d is present and places a script there, all
    should be well, since I am using ifupdown, too.

    Except that that script might use invoke-rc.d, which is a
    Debian-specific interface my OS doesn't implement.  So I cannot
    use these hook scripts as-is, unless I _also_ adopt the
    invoke-rc.d interface from Debian.  The latter is somewhat
    ill-specified, so I (the hypothetical OS developer) am not going
    to do that.

In other words, yes, ifupdown hooks are Debian-specific, but they do
not have to be.  I would like the work I do on packaging software for
Debian to be useful for others when possible and have always been
reasonably happy with the efforts made in policy to support that (for
example by not including "debian" in the gcc triplet).

Jonathan



Reply to: