Description of problem: systemctl is-enabled foo.service does not display anything on screen if the service file exists, and displays an error if it doesn't exist. Version-Release number of selected component (if applicable): 26-8 How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: nothing Expected results: is / not enabled Additional info: ; echo $? displays 0 if the service file exists, 1 if it doesn't
To clarify last line above: it displays 0 whether the service is enabled or not, as long as it's not in /lib/*/ . Example: # systemctl enable sshd.socket # ls -l /lib/systemd/system/*wants/ | grep -i sshd # ls -l /etc/systemd/system/*wants/ | grep -i sshd lrwxrwxrwx. 1 root root 31 Jul 26 16:45 sshd.socket -> /lib/systemd/system/sshd.socket # systemctl is-enabled sshd.socket;echo $? 0 # systemctl disable sshd.socket rm '/etc/systemd/system/sockets.target.wants/sshd.socket' # systemctl is-enabled sshd.socket;echo $? 1 But # ls /lib/systemd/system/multi-user.target.wants/ dbus.service getty.target plymouth-quit-wait.service systemd-ask-password-wall.path fedora-sysinit-unhack.service plymouth-quit.service rc-local.service systemd-user-sessions.service # mv /lib/systemd/system/multi-user.target.wants/rc-local.service ~ # systemctl --system daemon-reload # ls /lib/systemd/system/*wants/ | grep -i rc-local # ls /etc/systemd/system/*wants/ | grep -i rc-local # systemctl is-enabled rc-local.service ; echo $? 0
Oops, returns 0 as long as it *is* under /lib . Sorry for this.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
In F16 this is fixed - 'systemctl is-enabled ...' prints the state to stdout. It's not the kind of change that would be good to backport at this point, so WONTFIX for F15.