Bug 709254

Summary: "ntsysv" only disables service for current runlevel which is not enough for systemd
Product: [Fedora] Fedora Reporter: Hong Xu <hong>
Component: chkconfigAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: bugs.michael, nerijus, notting, rvokal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-15 21:07:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hong Xu 2011-05-31 07:56:50 UTC
Description of problem:
It takes no effect when using "setup" to disable sshd and other system services, but chkconfig can (by chkconfig somethingd off).

Version-Release number of selected component (if applicable):
setuptool-1.19.11-3.fc15.x86_64
chkconfig-1.3.52-1.fc15.x86_64


How reproducible:
Everytime

Steps to Reproduce:
1. $ sudo setup
2. Enter "System services" and uncheck the sshd service;
3. quit setup and reboot.
  
Actual results:
sshd still starts after rebooting.

Expected results:
sshd should not starts automatically after rebooting.

Additional info:
"chkconfig sshd off" works well.

Comment 1 Michael Schwendt 2011-05-31 20:20:56 UTC
Cannot reproduce. Is rebooting strictly required?

If you run the following as root user

  runlevel
  chkconfig --list sshd
  ntsysv   # <-- here disable sshd
  chkconfig --list sshd

does the ntsysv tool fail to disable sshd for you? (Or does it get re-enabled after a reboot only?)

Comment 2 Michael Schwendt 2011-05-31 20:44:18 UTC
Actually, if a service is still "on" for any runlevel, systemd will happily start it because of its different runlevel concept.

"systemctl disable sshd" also runs a full "chkconfig sshd off" instead of giving it just the current runlevel.

ntsysv would need to do the same for compatibility.

Comment 3 Bill Nottingham 2011-05-31 21:25:27 UTC
Hm, that would be a rather abrupt behavior change, but I can see how that would make sense.

Comment 4 Hong Xu 2011-06-01 04:48:14 UTC
(In reply to comment #1)
> Cannot reproduce. Is rebooting strictly required?
> 
> If you run the following as root user
> 
>   runlevel
>   chkconfig --list sshd
>   ntsysv   # <-- here disable sshd
>   chkconfig --list sshd
> 
> does the ntsysv tool fail to disable sshd for you? (Or does it get re-enabled
> after a reboot only?)

The ntsysv only disabled sshd on runlevel 5.

Comment 5 Bill Nottingham 2011-07-15 20:43:33 UTC
http://git.fedorahosted.org/git/?p=chkconfig.git;a=commitdiff;h=5c0e515fdd19c89ab45f6b5d0e5587c3ca21804e

This will be in Fedora 16; it will not be backported to Fedora 15.