<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemctl is-enabled fails with absolute path or basename missing "service""
href="https://bugs.freedesktop.org/show_bug.cgi?id=56072">56072</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemctl is-enabled fails with absolute path or basename missing "service"
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>judy.wathen@hp.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>