Red Hat Bugzilla – Bug 161870
chkconfig LSB dependency frobber fails if the dep has no chkconfig line
Last modified: 2014-03-16 22:54:42 EDT
Description of problem:
frobDependencies doesn't set default start/stop priority on scripts (those other
than the one being added -- the 'servs' list) with no chkconfig line. As a
result, the start/stop priorities of both scripts in a short dependency chain
will end up with priority 50 which defeats the purpose.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create two scripts, neither with chkconfig line
2. make it so s2 depends (Required-Start) on s1 and s1 provides s1
3. run 'chkconfig --add' or install_initd on s1 then s2
both scripts will have start/stop priority of 50 which means dependencies are
s1 should have priority 50 and s2 should have priority 51 to ensure the
dependency on s1 is satisfied at start
Created attachment 116039 [details]
set default start/stop priority for potential dependencies if they have no chkconfig line
I found the same problem with the addition of a chkconfig: line being present.
From the hpasm init script (HP Agents for System Management):
# Copyright 2002 hp Information Technologies Group, L.P.
# See "man chkconfig" for information on next two lines (Red Hat only)
# chkconfig: 2345 91 1
# description: HP Advanced System Management Drivers and Agents for Linux
# Following lines are in conformance with LSB 1.2 spec
### BEGIN INIT INFO
# Provides: hpasm
# Required-Start: snmp
# Required-Stop: hprsm cmanic cmastor
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: starts hpasm (HP Advanced System Management Drivers and
### END INIT INFO
The chkconfig: line has 91 as the start priority but it created as 50, stop is
1 and it gets created with 0. chkconfig-1.3.11-0.3.i386.rpm and ntsysv-1.3.11-
0.3.i386.rpm do not have this problem.
Forgot to check snmpd init.d file, it has:
# chkconfig: - 50 50
Sorry, forgot to mention, I have been doing this on EL3, not 4 as the original
I have also experienced the same issue on RHE WS 3 with chkconfig 220.127.116.11-0.3
First it appears that if both chkconfig comments, and LSB comments are present
it defaults to using the LSB comments. As noted above if you set a start
dependency on scripts that have no LSB comments, and only have chkconfig
comment, the dependency will be resolved correctly. However if you set a start
dependency on a script that contains LSB comments, even if it also contains
chkconfig comments the start priorty will default to 50, and the dependency will
It appeared to me that this issue does not occur when setting a stop dependency
on scripts that contained LSB comments.
*** Bug 168457 has been marked as a duplicate of this bug. ***
Created attachment 119580 [details]
Updated chkconfig.c with recursive dependancy resolution
I had the same problem as Dave Lehman, with multiple dependancies not resolved
Here's an updated version (based on 1.3.20) that recursively resolves the start
order for all other dependancies, before assigning the start order for the
This works well in cases such as s2 depending on s1, which in turns depends on
There are still many possible improvements.
For example, when the dependancies are not resolved, instead of defaulting to
S50, it would be better to default to the "old" start order provided in the
"chkconfig:" header line.
Built in 18.104.22.168.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.