From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [systemd-devel] Make systemctl is-enabled work for templated units Date: Tue, 21 May 2013 15:47:31 +0200 Message-ID: <1369144051.1836.80.camel@rice-oxley.tremer.info> In-Reply-To: <20130521133008.GQ3394@in.waw.pl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6974101695931981086==" List-Id: --===============6974101695931981086== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Tue, 2013-05-21 at 15:30 +0200, Zbigniew Jędrzejewski-Szmek wrote: > 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! Thanks. > > 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. Okay. > > > 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 just wrote /etc to keep the message short. It should have been more precise, indeed. Thanks anyway for looking into that and amending the patch. -Michael --===============6974101695931981086==--