Bug 1333

Summary: chkconfig on/off changes multiple services (related to bug# 1166?)
Product: [Retired] Red Hat Linux Reporter: smc
Component: chkconfigAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-03-22 23:40:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description smc 1999-02-25 18:03:04 UTC
if you have 2 or more services with the same initial chars
(such as nfs and nfsfs) then chkconfig on and off for one
changes both (with one exception - see that last example
below).  It looks like it gets the length of the first
service name (which apparently is the short one under most
cases) and then just pulls out all services that match for
that number of chars. It's probably the same issue with
bug#1166 - probably the same parse routine?  I wasn't sure
whether I should put in a new bug or try to add comments to
the 1166.

root@nox:/ [31] # rpm -q chkconfig-0.9.6-1
chkconfig-0.9.6-1
root@nox:/ [32] # chkconfig --list | grep nfs
nfsfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
nfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
root@nox:/ [33] # chkconfig nfs off
root@nox:/ [34] # chkconfig --list | grep nfs
nfsfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
root@nox:/ [35] # chkconfig nfsfs on
root@nox:/ [36] # chkconfig --list | grep nfs
nfsfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
nfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
root@nox:/ [37] # chkconfig nfsfs off
root@nox:/ [38] # chkconfig --list | grep nfs
nfsfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
--- here's the only time it works properly:
root@nox:/ [39] # chkconfig nfs on
root@nox:/ [40] # chkconfig --list | grep nfs
nfsfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
root@nox:/ [41] #

Comment 1 David Lawrence 1999-02-25 20:51:59 UTC
I have been able to replicate this problem in the test lab. I Used the
chkconfig utility to enable both the nfs and the nfsfs services for
runlevels 3,4,5. When you use the chkconfig command:

chconfig nfs off

it disables both instead of just nfs. Also if you use

chkconfig nfsfs off

it also fails. This has been passed on to a developer.

Comment 2 Bill Nottingham 1999-03-22 23:40:59 UTC
fixed in chkconfig-1.0.2