[systemd-devel] Antw: Re: Can I enable/disable a target?

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Mon May 13 06:25:51 UTC 2019

>>> Lennart Poettering <lennart at poettering.net> schrieb am 09.05.2019 um 17:24
Nachricht <20190509152440.GC5854 at gardel-login>:
> On Do, 09.05.19 12:27, Ulrich Windl (Ulrich.Windl at rz.uni‑regensburg.de)
>> Hi!
>> Whenever I try to enable or disable a target (that exists), I get
>> "Failed to execute operation: No such file or directory". What file
>> or directory, please? Or what is the command trying to say?
> Well, "systemctl enable" could not find the target unit file in the
> directories it searches for them. Where did you place the unit file?

Meanwhile I know: My generator was using bash, and for more reliability I
dared to add "set -u". As it turned out my version of Bash has a bug that
causes false reports of unset variables with arrays, so the generator failed
(the thread of handling exit codes of generators). As a consequence of that,
the unit file wasn't created any more (which I hadn't realized at that time).

But still combining the concepts "operation" and "No such file or directory"
is odd: An operation is neither a file nor a directory.

As said in an other thread, the preferred error message is something like
Failed to execute operation: blabla not found", where "blabla" is the unit in


More information about the systemd-devel mailing list