Description of problem: If you try to enable/disable a service, but you forget to put ".service" at the end, you get a very obscure error which doesn't explain what's going on at all: $ sudo systemctl disable libvirtd Failed to issue method call: Invalid argument Version-Release number of selected component (if applicable): systemd-188-3.fc18.x86_64 How reproducible: 100% Steps to Reproduce: 1. See command above. Expected results: It should explain that the service "libvirtd" is not known. For extra points it could suggest adding .service to the end of the name (or .socket etc).
Created attachment 612463 [details] Appends .service when enable/disable... called Same thing works for start/stop/... - if you call 'start libvirtd', systemctl will append .service to it. This patch provides the same behaviour for enable/disable/...
One hunk in that patch adds a blank line, with no functional change. The approach seems OK - making it work more like start/stop.
Created attachment 612531 [details] Appends .service when enable/disable... called Sorry, I missed that hunk completely. Should by ok now
I'd prefer if we'd move that loop into its own function. Also, use strv_free() to free the array afterwards. And you need to check for OOM (this is run from PID 1!). Otherwise looks good.
Created attachment 612613 [details] Appends .service when enable/disable... called Lennart, thanks for your comment. Changed with respect to it.
Applied with minor coding style fixes.
systemd-190-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/systemd-190-1.fc18
Package systemd-191-2.fc18, rtkit-0.11-3.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-191-2.fc18 rtkit-0.11-3.fc18' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-191-2.fc18 then log in and leave karma (feedback).
This didn't fix the problem, I see this: #systemctl disable atd.service Failed to issue method call: Argument 0 is specified to be of type "string", but is really type "array".
Steve, that's an unrelated bug, in the SELinux code: https://bugzilla.redhat.com/show_bug.cgi?id=859614
Package glibc-2.16-17.fc18, systemd-192-1.fc18, selinux-policy-3.11.1-23.fc18, rtkit-0.11-3.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 systemd-192-1.fc18 selinux-policy-3.11.1-23.fc18 rtkit-0.11-3.fc18' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14581/selinux-policy-3.11.1-23.fc18,rtkit-0.11-3.fc18,systemd-192-1.fc18,glibc-2.16-17.fc18 then log in and leave karma (feedback).
Package glibc-2.16-17.fc18, rtkit-0.11-3.fc18, systemd-193-1.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 rtkit-0.11-3.fc18 systemd-193-1.fc18' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-193-1.fc18,glibc-2.16-17.fc18 then log in and leave karma (feedback).
It looks like the same error message is issued for "sytemctl is-enabled foo" (as opposed to "systemctl is-enabled foo.service". In additon the error message occors for many instances of "chroot /chroot_mnt systemctl enable foo" "chroot /chroot_mnt systemctl disble foo", etc. I have a fix for these cases. Can I submit it to this bugzilla, or do I need to raise a new one? Thanks, Judy
Judy, please file a new bug for this!
systemd-44-20.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/systemd-44-20.fc17