Bug 106193 - chkconfig doesn't parse LSB comments
Summary: chkconfig doesn't parse LSB comments
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: chkconfig   
(Show other bugs)
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
Blocks: 132991 132992 137160
TreeView+ depends on / blocked
Reported: 2003-10-03 15:40 UTC by Eric Sandeen
Modified: 2014-03-17 02:39 UTC (History)
5 users (show)

Fixed In Version: RHBA-2005-118
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-28 15:20:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for the issue mentioned (1.28 KB, patch)
2005-01-13 18:09 UTC, Bill Nottingham
no flags Details | Diff
better patch (1.87 KB, patch)
2005-01-14 03:58 UTC, Bill Nottingham
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:115 normal SHIPPED_LIVE chkconfig bug fix update 2005-04-28 04:00:00 UTC
Red Hat Product Errata RHBA-2005:116 normal SHIPPED_LIVE chkconfig bug fix update 2005-05-19 04:00:00 UTC
Red Hat Product Errata RHBA-2005:118 normal SHIPPED_LIVE chkconfig bug fix update 2005-06-09 04:00:00 UTC

Description Eric Sandeen 2003-10-03 15:40:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131

Description of problem:
Since redhat-lsb provides /usr/lib/lsb/install_initd (as a symlink
to /sbin/chkconfig), I assumed that calling install_initd on an
initscript with lsb-compliant header comments would install the
initscript.  This seems to not be the case.

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

How reproducible:

Steps to Reproduce:
1. create dummy /etc/init.d/foo:

#! /bin/sh
# Provides: foo
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start foo

2. call /usr/lib/lsb/install_initd foo

3. call chkconfig --list foo

Actual Results:  service foo supports chkconfig, but is not referenced in any
runlevel (run 'chkconfig --add foo')

Expected Results:  The LSB-compliant initscript should have been installed into
the correct runlevels

Additional info:

I realize that LSB initscripts work in pretty different ways than
Red Hat Linux scripts, esp. with the # Required-Start: $network constructs,
etc.  OTOH, I thought redhat-lsb would give me what I needed to
make this work.  Any comments?



Comment 1 Bodo Meissner 2004-06-04 08:30:31 UTC
On Red Hat Enterprise Linux ES release 3 (Taroon) links in /etc/rc?.d
will be installed by /usr/lib/lsb/install_intd /etc/init.d/foo but
with start and stop priority -1, e.g.
/etc/rc0.d/K-1foo -> ../init.d/foo
/etc/rc3.d/S-1foo -> ../init.d/foo

According to lsb_release output this distribution claims to be LSB 1.3
compliant, so it should install startup scripts according to LSB

Comment 2 Jeff Lawson 2004-10-04 19:01:27 UTC
On Redhat Enterprise ES 3 I am seeing a similar problem.

However, with my own initscript I am not seeing the behavior of start
and stop priority "-1" symlinks being created at all, regardless of
whether I use install_initd or "chkconfig --add scriptname" directly.
 My init script even includes both the old style and new LSB style
comments in it:

# chkconfig: 35 99 28
# description: Sample program

# Default-Start:  3 5
# Default-Stop:   0 1 3 5 6
# Short-Description:  Sample program
# Description:  Sample program

Comment 3 Jeff Lawson 2004-10-04 19:24:16 UTC
I think bug 85678 may fix this, for which an errata for both RHEL 2.1
and RHEL 3.0 has already been released.

Comment 4 Bill Nottingham 2004-10-04 20:21:20 UTC
Can you reproduce this with the errata version?

Comment 5 Jeff Lawson 2004-10-04 20:30:04 UTC
I've just installed the errata, and it seems that having both types of
comment blocks in the same initscript confuses chkconfig somehow. 
With the lines from comment 2 in a sample initscript, I only see these
symlinks created:


When I remove the old style comment and leave ONLY the LSB style, I
see these links created:


Repositioning the old style comments below the LSB block doesn't seem
to help.  Removing the LSB block and leaving ONLY the old style block:


It would be nice to be able to allow both styles of comments in the
same file so that my startup script can be compatible with multiple

Comment 6 Jeff Lawson 2004-10-04 21:09:30 UTC
FYI, the original report mentioned in comment #1 does not repro for me
using the errata version:

[root@moltar root]# /usr/lib/lsb/install_initd /etc/init.d/foo
[root@moltar root]# chkconfig --list foo
foo             0:off   1:off   2:off   3:on    4:on    5:on    6:off

but my comment #5 still stands.

Comment 7 Bill Nottingham 2005-01-13 18:09:33 UTC
Created attachment 109733 [details]
patch for the issue mentioned

This patch makes LSB comments take precendence always over '# ckhconfig:'

Comment 8 Bill Nottingham 2005-01-14 03:58:30 UTC
Created attachment 109769 [details]
better patch

Comment 13 Jeff Lawson 2005-03-09 18:50:49 UTC
Is there an estimate for when that patch will be committed?

Comment 14 Bill Nottingham 2005-03-09 19:10:46 UTC
It's currently scheduled for the next update releases.

Comment 15 Jay Turner 2005-03-17 14:15:52 UTC
I'm still seeing some issues with initscripts-7.93.13.EL-1.i386 on RHEL4.  With
the initscript from comment 2, I'm getting the following after running

# chkconfig --list foo
foo             0:off   1:off   2:off   3:off   4:off   5:off   6:off

# ls /etc/rc*/*foo
/etc/rc0.d/K28foo  /etc/rc2.d/K28foo  /etc/rc4.d/K28foo  /etc/rc6.d/K28foo
/etc/rc1.d/K28foo  /etc/rc3.d/K28foo  /etc/rc5.d/K28foo

Comment 16 Bill Nottingham 2005-03-17 19:47:58 UTC
The initscript in comment 2 says:

# Default-Start:  3 5
# Default-Stop:   0 1 3 5 6

The default-stop is overriding the default-start.

Jay, which version of chkconfig are you using?

Comment 17 Jay Turner 2005-03-18 07:41:02 UTC
I really should have noticed that . . . sorry, I'm an idiot.  I'll retest with
correct initscripts.  Also not really sure why I posted the initscripts version
above.  I suspect I'm going to find that I updated the wrong package.

Comment 18 Jay Turner 2005-03-30 12:13:50 UTC
chkconfig- makes things all better and is included in the latest
U1-candidate builds.

Comment 19 John Flanagan 2005-04-28 15:20:02 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.


Comment 20 Jeff Lawson 2005-04-28 20:02:33 UTC
That errata is for ES 2.1; will there be an errata for ES 3 also (and maybe ES 4)?

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