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 8032

Summary: chkconfig --level <N> <SUBSYS> does not work
Product: [Retired] Red Hat Linux Reporter: Jos Vos <jos>
Component: chkconfigAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-05 21:22:25 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 Jos Vos 1999-12-28 23:43:28 UTC
The return code of chkconfig is not correct when checking whether a
subsystem should be enabled for a specific runlevel.  Scenario:

  [root@huey /root]# runlevel
  N 3
  [root@huey /root]# chkconfig --list sshd
  sshd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
  [root@huey /root]# chkconfig sshd
  [root@huey /root]# echo $?
  0
  [root@huey /root]# chkconfig --level 3 sshd
  [root@huey /root]# echo $?
  1
  [root@huey /root]#

Obviously, the return codes of the chkconfig command with and without the
--level parameter should be the same.

Comment 1 Bill Nottingham 2000-02-05 18:38:59 UTC
This runs into the problem of what you return in the following
case:

[root@huey /root]# runlevel
N 3
[root@huey /root]# chkconfig --list sshd
sshd 0:off 1:off 2:off 3:on 4:on 5:off 6:off
[root@huey /root]# chkconfig --level 35 sshd

Got any preferred semantics?

Comment 2 Jos Vos 2000-02-05 21:22:59 UTC
When one runlevel number is specified, the semantics are clear, I think (and
this does not work correctly at the moment).  Better forbid specifying more than
one runlevel in query mode, as this doesn't make sense, IMHO.

Comment 3 Bill Nottingham 2000-10-19 06:38:54 UTC
Hm, this seems to work now, although I don't recall
when it got fixed.