Re: systemd black magic (was "Re: Question about mdcheck")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Jeffery, dear David,


Am 05.04.21 um 21:06 schrieb David T-G:
Jeffery, et al --

...and then Jeffery Small said...
%
...
% I do not want to edit the files under /lib/systemd/system/
% which would certainly be overwritten with future updates.
% Can I place copies of these files in /etc/systemd/system
% and completely override the entries under /lib/systemd?

Yes.  That is exactly the right way to do it.  In fact, there's a
way you can only make changes such as adding a param (but not removing;
that DOES require wholesale overriding) so that you don't have to
maintain the entire separate copy, which might then diverge with nice
changes across updates.  On the other hand, it can be nice to have
absolute control over what happens.

Yes, extending or overriding a unit is part of systemd’s design. Often drop-in snippets allow you to only change specific things, so you get the other updates, in case the software (often distribution package) changes something.

You can easily use `systemctl edit …` to do extend or override a unit [1][2].


Kind regards,

Paul


[1]: https://www.freedesktop.org/software/systemd/man/systemctl.html#edit%20UNIT%E2%80%A6 [2]: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux