Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161870 - chkconfig LSB dependency frobber fails if the dep has no chkconfig line
Summary: chkconfig LSB dependency frobber fails if the dep has no chkconfig line
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: chkconfig
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Ben Levenson
Depends On:
Blocks: 168429
TreeView+ depends on / blocked
Reported: 2005-06-27 23:07 UTC by David Lehman
Modified: 2014-03-17 02:54 UTC (History)
7 users (show)

Fixed In Version: RHBA-2006-0018
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-03-07 18:32:20 UTC
Target Upstream Version:

Attachments (Terms of Use)
set default start/stop priority for potential dependencies if they have no chkconfig line (deleted)
2005-06-27 23:07 UTC, David Lehman
no flags Details | Diff
Updated chkconfig.c with recursive dependancy resolution (deleted)
2005-10-04 08:38 UTC, Jean-François LARVOIRE
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0018 qe-ready SHIPPED_LIVE Updated chkconfig package available 2006-03-06 05:00:00 UTC

Description David Lehman 2005-06-27 23:07:22 UTC
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):

How reproducible:

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
Actual results:
both scripts will have start/stop priority of 50 which means dependencies are
effectively ignored

Expected results:
s1 should have priority 50 and s2 should have priority 51 to ensure the
dependency on s1 is satisfied at start

Additional info:

Comment 1 David Lehman 2005-06-27 23:07:23 UTC
Created attachment 116039 [details]
set default start/stop priority for potential dependencies if they have no chkconfig line

Comment 2 Ulf Zimmermann 2005-07-28 02:49:24 UTC
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
# 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 

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.

Comment 3 Ulf Zimmermann 2005-07-28 02:50:34 UTC
Forgot to check snmpd init.d file, it has:

# chkconfig: - 50 50

Comment 4 Ulf Zimmermann 2005-07-28 02:51:37 UTC
Sorry, forgot to mention, I have been doing this on EL3, not 4 as the original 

Comment 5 Shawn Bohrer 2005-09-13 20:19:47 UTC
I have also experienced the same issue on RHE WS 3 with chkconfig
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
be ignored.

It appeared to me that this issue does not occur when setting a stop dependency
on scripts that contained LSB comments. 

Comment 6 Bill Nottingham 2005-09-16 16:16:26 UTC
*** Bug 168457 has been marked as a duplicate of this bug. ***

Comment 7 Jean-François LARVOIRE 2005-10-04 08:38:15 UTC
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
target script.

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.

Comment 14 Bill Nottingham 2005-11-10 23:32:17 UTC
Built in

Comment 19 Red Hat Bugzilla 2006-03-07 18:32:21 UTC
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.

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