chiark / gitweb /
systemctl: make systemctl is-enabled work for templated units
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 May 2013 13:45:48 +0000 (15:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 May 2013 13:23:51 +0000 (09:23 -0400)
commit67820a0cbdc9d72a1074debf8b2bc72203c775cc
tree64fead0aa2275d7ab81319d533ecd99cb7d2d303
parent9e9c3abcfa6b93500960531d0d7aa64b8b2b0349
systemctl: make systemctl is-enabled work for templated units

Patch resolves the problem that 'systemctl is-enabled' does
not work for templated units.

Without this patch, systemctl is-enabled something@abc.service
returned "No such file or directory", because it first checked
if /usr/lib/systemd/system/something@abc.service, etc. exists.
If systemctl is-enabled is called for templated units, this
check should be omitted and it should search for symlinks in
the .wants dirs right away.

This patch fixes the broken behaviour and resolves
  https://bugs.freedesktop.org/show_bug.cgi?id=55318.

[zj: fixed the patch to still check for broken symlinks and
     masked instances. Also removed untrue assumptions from
     the patch description.]
src/shared/install.c