Bug 467863 - chkconfig can't distinguish between SysV and xinetd services of the same name [NEEDINFO]
chkconfig can't distinguish between SysV and xinetd services of the same name
Product: Fedora
Classification: Fedora
Component: chkconfig (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
: FutureFeature, Patch
Depends On:
Blocks: F11Target
  Show dependency treegraph
Reported: 2008-10-21 08:26 EDT by Michal Schmidt
Modified: 2014-03-16 23:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-04 23:13:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
nphilipp: needinfo? (notting)

Attachments (Terms of Use)
add an optional --type <sysv|xinetd> parameter to chkconfig (12.03 KB, patch)
2008-10-21 08:26 EDT, Michal Schmidt
no flags Details | Diff

  None (edit)
Description Michal Schmidt 2008-10-21 08:26:39 EDT
Created attachment 321007 [details]
add an optional --type <sysv|xinetd> parameter to chkconfig

Description of problem:
There's no way chkconfig could enable/disable a xinetd service if there exists a SysV service of the same name. A real example is pure-ftpd which installs both:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. yum install pure-ftpd
2. chkconfig --list pure-ftpd
2. chkconfig pure-ftpd on

Actual results:
chkconfig operates only on the SysV pure-ftpd service. There's no way to query or configure the xinetd pure-ftpd service using chkconfig.

Expected results:
chkconfig should take an optional parameter to disambiguate between SysV and xinetd services.
chkconfig --list --type xinetd pure-ftpd
chkconfig --type xinetd pure-ftpd on
Another use-case:
chkconfig --list --type sysv   (to skip listing xinetd services)

Additional info:
I'm attaching a patch to add this functionality to chkconfig.
Comment 1 Bill Nottingham 2008-10-21 09:29:56 EDT
As this changes the command line options and adds new translatable strings, this will have to wait until post-F10. Looks reasonable at a first glance, though.
Comment 2 Bill Nottingham 2008-12-04 23:13:18 EST
Took a bit of massaging, but added in:


Will be in 1.3.40-1.
Comment 3 Nils Philippsen 2009-02-17 06:45:42 EST
Would it be possible to have this in F-9, F-10?

As system-config-services uses chkconfig to find out about how services are configured, it gets confused with old chkconfig versions that return the SysV status when it attempts to query the xinetd "incarnation" of the pure-ftpd service. Mind that I intend to make system-config-services cope better with chkconfig yielding unexpected results, but it'd be good if a user would be able to configure both types of the pure-ftpd service from the GUI.
Comment 4 Nils Philippsen 2009-02-17 06:46:45 EST
FYI, bug #467871 is the corresponding system-config-services bug.
Comment 5 Bill Nottingham 2009-02-17 09:52:01 EST
Given that 1.3.40 has the fix for bug 474223 in it, I'm a bit leery of dropping that on an existing release. Theoretically, none of the included Fedora software should be invoking it as install_initd, though.
Comment 6 Nils Philippsen 2009-02-17 11:38:29 EST
(In reply to comment #5)
> Given that 1.3.40 has the fix for bug 474223 in it, I'm a bit leery of dropping
> that on an existing release.

Judging from the reporter's latest comment in that bug, there still seems to be a problem with the patch. According to comments he made in the linuxbase.org bugzilla ticket, he would have reopened bug #474223 if he knew how. I've told him in the "upstream" ticket that he should be able to just change the status back from CLOSED, I hope I don't step on your toes with that ;-).

Anyway, I planned to just let s-c-services check the version of chkconfig (by parsing `chkconfig --version`) and either use "--type ..." if it's >= 1.3.40 or do more sensible things with older versions than throwing around exceptions if it can't parse chkconfig output (e.g. if it gets SysV-formatted output when checking an xinetd service).

Perhaps we can let these fixes mature just a bit in Rawhide and push them back to F-9, F-10 when the beta is out for a while, i.e. they got a certain amount of testing?

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