From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zbigniew =?utf-8?q?J=C4=99drzejewski-Szmek?= To: development@lists.ipfire.org Subject: Re: [systemd-devel] Make systemctl is-enabled work for templated units Date: Tue, 21 May 2013 15:30:08 +0200 Message-ID: <20130521133008.GQ3394@in.waw.pl> In-Reply-To: <1368971148.1836.45.camel@rice-oxley.tremer.info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7544546772080745184==" List-Id: --===============7544546772080745184== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sun, May 19, 2013 at 03:45:48PM +0200, Michael Tremer wrote: > Hello guys, > > in this mail, you will find a patch which resolves the problem, that > 'systemctl is-enabled' does not work for templated units. Applied! > See also https://bugs.freedesktop.org/show_bug.cgi?id=55318 for > reference. > > Without this patch, systemctl is-enabled something(a)abc.service > returned "No such file or directory", because it was checked > if /usr/lib/systemd/system/something(a)abc.service, etc. existed, > which is obviously not the case. Actually, we can mask instance units, so "obviously" is not true. And we can also "concretize" instance units by adding a normal unit file for the instance. I tweaked your patch to just ignore ENOENT for instance units, but perform the checks. > If systemctl is-enabled is called for templated units, this > check should be omitted and it should be searched for symlinks > in the /etc paths right away. Actually links can appear not just in /etc, so this part of the description is misleading. > I would like to request that this is merged to the systemd git tree. This is implied :) Zbyszek --===============7544546772080745184==--