[systemd-devel] How to override generators on debian (v215)?

nusenu nusenu at openmailbox.org
Thu Aug 18 08:28:00 UTC 2016


Hello,

thank you for your answers!

Martin Pitt wrote:
> nusenu [2016-08-17 16:02 +0000]:
>> according to the official documentation from upstream systemd [1] it is
>> possible to override a package generator by placing a custom generator
>> (with the same name) into  /etc/system/system-generator.
> 
> FWIW, this is a bad place -- binaries don't belong into /etc/ and
> shouldn't be considered "configuration", this should rather go into
> /usr/local/lib/systemd/system-generators (which is also supported).

Files in
/usr/local/lib/systemd/system-generators (or /etc/systemd/system-generator)
do not seem to run on daemon-reload, I assume these locations are not
supported on debian stable(?) - but as you said that is tangential.


> You can remove the executable bit of the shipped generator:
> 
>   dpkg-statoverride --update --add root root 644 /lib/systemd/system-generators/systemd-getty-generator
> 
> dpkg-statoverride instead of chmod will ensure that the next update of
> the package that ships it will not set it back. Then just put your
> generator into /lib/systemd/system-generators/ with a different name.

Thank you that does the job!

I just have to remember that I can ignore the resulting error messages:

systemd: /lib/systemd/system-generators/tor-generator failed with error
code 1.
systemd: Failed to execute /lib/systemd/system-generators/tor-generator:
Permission denied


kind regards,
nusenu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160818/d529c0bf/attachment.sig>


More information about the systemd-devel mailing list