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.
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?
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.
Hm, this seems to work now, although I don't recall when it got fixed.