Bug 8032 - chkconfig --level <N> <SUBSYS> does not work
chkconfig --level <N> <SUBSYS> does not work
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: chkconfig (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-12-28 18:43 EST by Jos Vos
Modified: 2014-03-16 22:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-05 16:22:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jos Vos 1999-12-28 18:43:28 EST
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 13:38:59 EST
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 16:22:59 EST
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 02:38:54 EDT
Hm, this seems to work now, although I don't recall
when it got fixed.

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