Bug 246076 - Chkconfig LSB dependency processing very brittle
Summary: Chkconfig LSB dependency processing very brittle
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: chkconfig   
(Show other bugs)
Version: 4.5
Hardware: All Linux
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-06-28 12:07 UTC by Ryan Thomas
Modified: 2014-03-17 03:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-28 13:27:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Ryan Thomas 2007-06-28 12:07:54 UTC
Description of problem:

chkconfig LSB processing is truly brittle.  I have a case where I get different
results with two init scripts that only differ in the presence of a single
comment line.  If the comment line is removed, start/stop sequences are correct
if it is present chkconfig comes up with to S99/K01 levels.

So here is the start of the script I was writing.

# myservice - Illustrates a bug in chkconfig
# /etc/rc.d/init.d/myservice
# chkconfig: 345 58 22
# description: Bug reporting
# Provides: feedback
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Required-Start: $network
# Required-Stop: $network
# Description:  none

If the "### BEGIN INIT INFO" line is present then I get S99/K01 links

# grep BEGIN /etc/rc.d/init.d/myservice; echo; chkconfig --del myservice;
chkconfig --add myservice; find /etc/rc.d/ -name \*myservice


If I remove it, the links are as expected

grep BEGIN /etc/rc.d/init.d/myservice; echo; chkconfig --del myservice;
chkconfig --add myservice; find /etc/rc.d/ -name \*myservice


Part of the problem is the "$network" dependency which in RHEL 4.5 can be
multiply defined by the network and NetworkManager rc scripts

# grep Provides: /etc/rc.d/init.d/* | grep network
/etc/rc.d/init.d/NetworkManager:# Provides: $network
/etc/rc.d/init.d/network:# Provides: $network

If I remove the NetworkManager package, then chkconfig always gives the right
start/stop levels even if the troublesome comment line is present.

I've checked the chkconfig released with Fedora 7 (1.3.34) as well and found
processing is still broken with that version.

Version-Release number of selected component (if applicable): RHEL 4.5 AS

The packages installed currently are:


How reproducible: 100%

Steps to Reproduce:
1. Install NetworkManager and initscripts RPMS so that the $network dependency
is multiply defined.
2. Create a startup script with chkconfig comments as listed above
3. chkconfig delete and add the service and check the symlinks created.
Actual results:

see above

Expected results:

see above

Additional info:

Comment 1 Bill Nottingham 2007-06-28 13:27:44 UTC
This is the intended behavior.

1) ### BEGIN INIT INFO implies you want to set priorities via LSB dependencies
2) $network is/was provided by NetworkManager, so that affects where your script
is ordered. This is actually changed in later NetworkManager releases.

Note You need to log in before you can comment on or make changes to this bug.