You are not logged in.
I've looked for some time and can't seem to find the answer. Every time lirc is updated with pacman it overwrites my custom lirc.service file, the only search result i've found mentions using NoUpgrade with pacman but that was from 2010 and doesn't seem to be in the pacman man file any longer?
Offline
https://wiki.archlinux.org/index.php/Sy … vice_files
A unit file in /etc/systemd/system/ always overrides the same unit in /usr/lib/systemd/system/. Note that when the original unit in /usr/lib/ is changed due to a package upgrade, these changes will not automatically apply to your custom unit file in /etc/.
Offline
Where are you creating it?
You want to put customised systemd units in /etc/systemd/system e.g. copy /usr/lib/systemd/system/lirc.service to /etc/systemd/system/lirc.service and edit the copy. Or you can add an override file by creating /etc/systemd/system/lirc.service.d/myconfig.conf which can just tweak the particular bits you want to tweak (at least in theory - it hasn't worked great for me so far).
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Thanks for the replies. I wasn't aware I should not be editing the original /usr/lib/systemd/system/lirc.service file, i'll switch to your method cfr.
Offline
Drop-in replacements work great for me. What is nice about them is that you can actually replace a given configuration option. This is done by first setting the value blank and then putting what you want. So for example, if you wanted to change the ExecStart line, you would do:
[Service]
ExecStart=
ExecStart=/new/value/here ---with-args ---and-stuff Offline
Thank you! That's what I needed to get it to accept my conf tweak for cronie - it wouldn't accept a second ExecStart line and it wasn't clear how to override it. I remembered something vaguely but I couldn't find anything easily when I searched. (Is there documentation on this?)
Also, how would you use this to adapt a particular instance of a template? I actually tried this and I have now managed to mess up the getty on tty even though I thought I'd backed out all my changes. So I'm a bit wary.
I tried creating
# getty@.service.d/TTYVTDisallocate-BLOCK.conf
[Service]
TTYVTDisallocate=nobut it did not work quite as expected. Trying to change it back, I removed this directory etc. but tty1 is still allocated, I think (I can still log in there) and I have no idea why.
I'm actually really not clear how the getty service affects only tty1 anyway except that it seems that tty2-6 are created with generators rather than with this service so it effectively only applies to tty1.
Last edited by cfr (2013-08-19 02:07:42)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
When the gnerators are involved, I really have no idea how it is supposed to work. There is no real documentation on this that i have been able to find. So I cannot really give a definitive answer. I *think* that you should be able to apply things globally in the way you show above. That is if you use whatever@.service.d. But I know that you can definitely make it a per instance thing with whatever@instance.service.d. But again, I have no idea how this will act with the autogeneration services such as getty@.
Offline
Now I'm more confused. I didn't think getty@ was a generator. I thought it was called by a generator...
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline