Description of problem: On any of our OS releases prior to RHEL5 (and FC5/6 as far as I can tell), chkconfig would return no error output when it was executed on a host to query for a service if it is not installed. Example: [csmith@monitor ~]$ cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 4) [monitor.mgmt.stage.redhat.com] [12:54:03 PM] [csmith@monitor ~]$ rpm -qa | grep ypserv [monitor.mgmt.stage.redhat.com] [12:54:10 PM] [csmith@monitor ~]$ /sbin/chkconfig ypserv [monitor.mgmt.stage.redhat.com] [12:54:18 PM] [csmith@monitor ~]$ On RHEL5 hosts, it now returns what _appears_ as a syntax error on the host with the same situation: [root@rhnserver3 ~]# /sbin/chkconfig ypserv chkconfig version 1.3.30.1 - Copyright (C) 1997-2000 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License. usage: chkconfig --list [name] chkconfig --add <name> chkconfig --del <name> chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities> [rhnserver3.proxy.stage.redhat.com] [12:55:57 PM] [root@rhnserver3 ~]# yum -y install ypserv &>/dev/null [rhnserver3.proxy.stage.redhat.com] [12:56:28 PM] [root@rhnserver3 ~]# /sbin/chkconfig ypserv [rhnserver3.proxy.stage.redhat.com] [12:56:34 PM] [root@rhnserver3 ~]# rpm -e ypserv [rhnserver3.proxy.stage.redhat.com] [12:56:36 PM] [root@rhnserver3 ~]# This causes errors to be displayed in shell commands or automated scripts that rely on it. STDERR can certainly be redirected, but this doesn't seem to be the correct solution or the correct behavior for the command based on past history. Version-Release number of selected component (if applicable): chkconfig-1.3.13.4-1 (RHEL4u4) chkconfig-1.3.30.1-1 (RHEL5b2+) How reproducible: On any RHEL5 box, at any time. Steps to Reproduce: See information pasted above. Actual results: See information pasted above. Expected results: I would expect the command to return with no error output. Additional info:
So, this is the result of two fixes: - enable 'chkconfig <foo>' to work for xinetd services (bug 63123) - reporting errors when passed invalid commandline arguments (bug 147393) These went into chkconfig-1.3.15, which was in FC4+. We could change this, although it would essentially revert bug 147393.
Created attachment 147126 [details] potential patch
Bill-- That's cool. But how is what I've shown in my example an incorrect command line argument? CMS
It's really not. I suppose someone might want more feedback about the service not existing, as opposed to just not being enabled. But that would be a bigger change. Putting on the 5.1 radar.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Since this bugzilla is in a component that is not approved for the current release, it has been closed with resolution deferred. You may reopen this bugzilla for consideration in the next release.
Fixed in 1.3.30.1-2.
The "fix" is to swallow the fact that something is wrong. If a user does chkconfig --list foo You get: error reading information on service foo: No such file or directory Why not give the same message for chkconfig foo
Because changing it breaks past historical usage.
*** Bug 439361 has been marked as a duplicate of this bug. ***
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0456.html