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

Re: LSB Spec 1.0 Criticism



On Fri, Jul 06, 2001 at 07:40:36PM +1000, Anthony Towns wrote:
>
> Further to the facility name issues, what's the intended behaviour for
> facilities provided by multiple scripts? If we have scripts A1, A2, B
> where:
> 
> 	A1 # Provides: A
> 	A2 # Provides: A
> 	B  # Required-Start: B
> 
> would it be correct to run A1, B, A2 or A2, B, A1; or must both A1 and A2
> be run before B?

That's currently not specified.  It was questionable whether or not we
should have defined the "Provides:" header at all, and it might be
simpler just to remove it for now.  This basically would mean that
applications could depend on distribution-provides facilities (i.e.,
$network, $named, etc.), but LSB-provided init scripts couldn't
actually provides new facilities.

My thinking at the time the case where multiple scripts provide the
same boot facility would be rare, and should at the very least
generate a warning when the init script was installed.  But if it did
happen, it probably makes the most amount of sense to say that after
script A1 or A2 runs, B is allowed to run.  But if the distribution
wants to enforce things so that A1 and A2 must be run first, that's OK
too.

> What is the correct behaviour if a Required-Start: or a Required-Stop:
> can't be satisfied? (A package has a script that has Required-Start: foo,
> but doesn't explicitly list a package providing init.d/foo in the rpm
> dependencies) Should the package fail to install entirely somehow? Is it
> enough for /usr/lib/lsb/install_initd to exit with a failure code? Should
> lsb/install_initd succeed but not run the script? Should everything succeed
> and the script be run without "foo" at all?
> 
> Similarly, what should happen if some scripts are installed that have
> circular Required-Starts?

This gets detected when the script gets installed via
/usr/lib/lsb/install_initd; that's the script provided by the
distribution whose job it is to read the comments and make a
determination about what the appropriate S??/K?? numbers should be
used if you're using an traditional System V-based init.d system,
given a particular distribution.

So if there are circular dependencies, or a dependency which can't be
satisified, install_initd should return an error, which in theory
should cause the postinstall script to exit, which should cause an
error when the package is installed.

						- Ted



Reply to: