Bug 8032 - chkconfig --level <N> <SUBSYS> does not work
Summary: chkconfig --level <N> <SUBSYS> does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: chkconfig
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-28 23:43 UTC by Jos Vos
Modified: 2014-03-17 02:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-05 21:22:25 UTC


Attachments (Terms of Use)

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.


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