SUSE Support

Here When You Need Us

chkconfig/insserv fail to solve dependencies of services

This document (7014502) is provided subject to the disclaimer at the end of this document.

Environment


SUSE Linux Enterprise Server 11

Situation

chkconfig and insserv can't resolve dependencies correctly between services and facilities.
Example: services blah and blob have to run after mailservice has started.

Both are configured via Should-Start:

# grep Should-Start blah blob
blah:# Should-Start:      $time ypbind  smtp
blob:# Should-Start:      $time ypbind smtp

Yet the outcome is not what is expected:

rc3.d/S14blah -> ../blah*
rc3.d/S14postfix -> ../postfix*
rc3.d/S16blob -> ../blob*

Resolution

Make sure to use single spaces between the services.
In the example above, service blah got two spaces between smtp and ypbind.
Correcting this gives the expected result:

# grep Should-Start blah blob
blah:# Should-Start:      $time ypbind smtp
blob:# Should-Start:      $time ypbind smtp

rc3.d/S14postfix -> ../postfix*
rc3.d/S16blah -> ../blah*
rc3.d/S16blob -> ../blob*

Cause

insserv and chkconfig stop reading lines after the second space in a row.

Additional Information

The LSB standard does not define how many spaces are allowed between services.
However the LSB examples do suggest to use a single one, so we stick with the suggestion.
Whenever writing LSB startscripts, make sure to use single spaces.
For the sake of readability  extra spaces are tolerated between "Should-Start:" and the facility list:
Should-Start:          boot_facility_1 [boot_facility_2...]

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7014502
  • Creation Date: 04-Feb-2014
  • Modified Date:12-Oct-2022
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.