[Fedora-packaging] LSB initscript ordering issues

John Dennis jdennis at redhat.com
Thu Dec 3 20:13:36 UTC 2009


On 12/03/2009 02:55 PM, Toshio Kuratomi wrote:
> On Thu, Dec 03, 2009 at 10:48:04AM -0500, John Dennis wrote:
>> On 12/03/2009 10:39 AM, Bill Nottingham wrote:
>>> John Dennis (jdennis at redhat.com) said:
>>>> The guidelines also state that an initiscript should never be marked
>>>> as %config and instead import configuration settings from
>>>> /etc/sysconfig/$name. But what about the case where a service may
>>>> have a variety of boot dependencies depending on how it's
>>>> configured? For example a service might be configured to optionally
>>>> use mysql vs. postgres, or to use LDAP vs. SQL so it will have boot
>>>> dependencies on particular services which cannot be hardwired ahead
>>>> of time.
>>>
>>> The LSB spec won't help you here, alas.
>>
>> Right, this isn't an LSB spec issue but a Fedora packaging guideline
>> issue. If a sysadmin configures the service to depend on a specific
>> set of dependency services then he/she will have to edit the
>> initscript, thus it should be marked %config so that this
>> customization is not lost.
>>
> It could be that the LSB, dependency style is not flexible enough to work in
> this instance.  We might be able to work around this with virtual provides,
> though.  We do want to avoid marking init scripts as %config and eventually,
> in the indefinite sense, we can use upstart's facilities to do this
> sort of thing.  So I'm not certain that we'd want to start encouraging
> people to mix config with the initscripts yet.

A more careful reading of the LSB spec might indicate this is a moot 
issue after all. If I understand correctly I think this can be 
accomplished by listing *every* optional dependency in the Should-Start 
list.

If I'm reading it correctly the items in Should-Start will be started 
earlier if and only if they are enabled to start.

For example if you're dependent on a SQL database and can choose between 
mysql and postgres in your configuration and elect to use mysql. Then 
the initscript would have:

# Should-Start: mysql postgres

and all the sysadmin must do is enable mysql to start at boot. Because 
mysql is enabled the mysql dependency will be honored, but the postgres 
dependency will not be honored because it's not enabled.

Or at least that's my interpretation ...

-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Fedora-packaging mailing list