[systemd-devel] Antw: Re: Antw: Re: Re: "bad" status for genersated target; why?
Ulrich.Windl at rz.uni-regensburg.de
Wed May 15 10:08:57 UTC 2019
>>> Lennart Poettering <lennart at poettering.net> schrieb am 15.05.2019 um 12:03
Nachricht <20190515100311.GA22945 at gardel-login>:
> On Mi, 15.05.19 11:57, Ulrich Windl (Ulrich.Windl at rz.uni‑regensburg.de)
>> >> could call "systemctl add‑wants ‑‑transient" to do the job,
>> >> but at that point, that's more pedantic than practical. If you write a
>> >> generator, your systemd‑fu should be high enough to know and
>> >> understand systemd's symlink mechanisms...
>> > Precisely. if you write your own generator, then you need to know what
>> > you do, and need to know how to place your symlinks. You are
>> > essentially writing your own unit file installer that way and are
>> > expected to create your own symlinks then.
>> I didn't see it that way: Generated units are just as units installed by
>> package manager, but specific to the local configuration. So why to make
>> differences?: A unit is a file that is found by systemd (after the
> Nope, that's simply not how they are designed. They are a mechanism
> how to extend the systemd dependency tree and install additional
> nodes in that tree.
> If you are looking for a generic converter of foreign stuff into
> classic, persistent systemd unit files, then generators is not what
> you should be using. Generators are life‑cycle bound to systemd
> release cycles, and their output ceases to exist on every reload
> boundary, and when the system is offline. If we'd allow generated
> units to be installed that clear life‑cycle would be very much
> blurred, as suddenly you'd have configuration that hooks them into the
> system that is more persistant than the actual definitions of the
> units themselves, and that's just borked...
> I mean, if you want to persistently enable a unit that is converted
> from something else, then please write your own converted, and write
> something to /etc/systemd/system, there's no need whatsoever to bother
> systemd itself with that, you shouldn't use generators for that.
Sorry, I still don't get it: The only(?) difference is the path where they
(units files) are found, and that the /run directory is volatile. Aren't the
other differences not just "artificial"?
> Lennart Poettering, Berlin
More information about the systemd-devel