sysvinit-devel
[Top][All Lists]
Advanced

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

Re: [sysvinit-devel] Teach insserv to handle virtual facility provides d


From: Dr. Werner Fink
Subject: Re: [sysvinit-devel] Teach insserv to handle virtual facility provides directly in init.d scripts?
Date: Mon, 21 Jun 2010 12:33:37 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Jun 19, 2010 at 09:10:55AM +0200, Petter Reinholdtsen wrote:
> Currently, virtual facilities are defined either in /etc/insserv.conf
> or in /etc/insserv.conf.d/, and in Debian we expect packages providing
> virtual facilities like $named to add a file in /etc/insserv.conf.d/.
> 
> Such package would have a init.d script header like this:
> 
>   ## BEGIN INIT INFO
>   # Provides: pdns
>   # ...
>   ## END INIT INFO
> 
> and a insserv.conf.d entry like this:
> 
>   $named pdns
> 
> Instead, what about teaching insserv to understand notation like this,
> and skip the insserv specific file in /etc/:
> 
>   ## BEGIN INIT INFO
>   # Provides: pdns $named
>   # ...
>   ## END INIT INFO
> 
> For this to work, insserv will have to accept and handle several
> scripts providing the same virtual facility, allowing setup like this:
> 
>   ## BEGIN INIT INFO
>   # Provides: pdns $named
>   # ...
>   ## END INIT INFO
> 
>   ## BEGIN INIT INFO
>   # Provides: bind $named
>   # ...
>   ## END INIT INFO
> 
>   ## BEGIN INIT INFO
>   # Provides: dnsmasq $named
>   # ...
>   ## END INIT INFO
> 
> Werner, any opinion on this?

Hmmm ... the problem with this approach is e.g. if network script
is not installed no $network will be provided even if other
scripts refer to $network.  Also it will move the responsibility
from the insserv maintainer forward to the individual package
maintainers including foreign package maintainers which may
(in my experience;) increase the numbers of potential problems.

> I suspect the LSB should be updated to document that this is an
> allowed setup, if we go this way.

For optional contributions for a system facility we could do
somewthing like

# Provides: dnsmasq
# X-Contribute: $named 

that could be a way to do this, and it would allow to use
nick names for a Provide.


    Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr



reply via email to

[Prev in Thread] Current Thread [Next in Thread]