Bug 56072 - systemctl is-enabled fails with absolute path or basename missing "service"
Summary: systemctl is-enabled fails with absolute path or basename missing "service"
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-17 07:18 UTC by Judy Wathen
Modified: 2013-05-06 19:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Judy Wathen 2012-10-17 07:18:28 UTC
Most systemctl "unit file" commands work with basename, basename without suffix, or absolute path now (October 17, 2012, 194 plus latest fixes).

However, "systemctl is-enabled", run on the booted system (not a chroot) fails when the argument is either an absolute path or a base name without the suffix (usually ".service").

Here are a couple examples:

 systemctl is-enabled /usr/lib/systemd/system/cups.service
Failed to issue method call: Invalid argument
[root@tw132001 yum.repos.d]# systemctl is-enabled cups
Failed to issue method call: Invalid argument
[root@tw132001 yum.repos.d]# systemctl is-enabled cups.service
disabled

For comparison, "systemctl enable" takes an argument in any format:

[root@tw132001 yum.repos.d]# systemctl enable cups
[root@tw132001 yum.repos.d]# echo $?
0
[root@tw132001 yum.repos.d]# systemctl enable cups.service
[root@tw132001 yum.repos.d]# echo $?
0
[root@tw132001 yum.repos.d]# systemctl enable /usr/lib/systemd/system/cups.service
[root@tw132001 yum.repos.d]# echo $?
0
[root@tw132001 yum.repos.d]#

This issue can be reproduced with cups, but other services will probably demonstrate the issue as well.
Comment 1 Lennart Poettering 2013-05-06 19:22:18 UTC
Fixed a while back.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.