Bug 106193
Summary: | chkconfig doesn't parse LSB comments | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Eric Sandeen <sandeen> | ||||||
Component: | chkconfig | Assignee: | Bill Nottingham <notting> | ||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 1.0 | CC: | ezannoni, jlawson-redhat, jturner, k.georgiou, rvokal | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | RHBA-2005-118 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2005-04-28 15:20:02 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 132991, 132992, 137160 | ||||||||
Attachments: |
|
Description
Eric Sandeen
2003-10-03 15:40:01 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 specification. 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 ### BEGIN INIT INFO # Default-Start: 3 5 # Default-Stop: 0 1 3 5 6 # Short-Description: Sample program # Description: Sample program ### END INIT INFO I think bug 85678 may fix this, for which an errata for both RHEL 2.1 and RHEL 3.0 has already been released. Can you reproduce this with the errata version? 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: /etc/rc.d/rc0.d/K28foo /etc/rc.d/rc1.d/K28foo /etc/rc.d/rc2.d/K28foo /etc/rc.d/rc3.d/K28foo /etc/rc.d/rc4.d/K28foo /etc/rc.d/rc5.d/K28foo /etc/rc.d/rc6.d/K28foo When I remove the old style comment and leave ONLY the LSB style, I see these links created: /etc/rc.d/rc0.d/K50foo /etc/rc.d/rc1.d/K50foo /etc/rc.d/rc2.d/S50foo /etc/rc.d/rc3.d/K50foo /etc/rc.d/rc4.d/S50foo /etc/rc.d/rc5.d/K50foo /etc/rc.d/rc6.d/K50foo 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: /etc/rc.d/rc0.d/K28foo /etc/rc.d/rc1.d/K28foo /etc/rc.d/rc2.d/K28foo /etc/rc.d/rc3.d/S99foo /etc/rc.d/rc4.d/K28foo /etc/rc.d/rc5.d/S99foo /etc/rc.d/rc6.d/K28foo 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 distributions. 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. Created attachment 109733 [details]
patch for the issue mentioned
This patch makes LSB comments take precendence always over '# ckhconfig:'
lines.
Created attachment 109769 [details]
better patch
Is there an estimate for when that patch will be committed? It's currently scheduled for the next update releases. 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 install_initd: # 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 The initscript in comment 2 says: ### BEGIN INIT INFO # 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? 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. chkconfig-1.3.13.2-1 makes things all better and is included in the latest U1-candidate builds. 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. http://rhn.redhat.com/errata/RHBA-2005-115.html That errata is for ES 2.1; will there be an errata for ES 3 also (and maybe ES 4)? |