1

Is there a configuration override, as is for service definition override?

How do I override or configure systemd services? mentions systemctl set-property foobar.service but I cannot get it to work:

# systemctl set-property systemd-resolve Resolve.LLMNR=no Resolve.DNSStubListener=no 
Unknown assignment: Resolve.LLMNR=no

Basically I want to add things to my base image that won't cause user annoyances if the base package updates the comments on those blank files. In this case I'd be affect by changes on /etc/systemd/resolved.conf but there are many other services where I face the same problem.

gcb
  • 262

1 Answers1

2

They follow the same pattern in general, with respect to override files. For example, from man resolved.conf, the paths looked at are:

/etc/systemd/resolved.conf
/etc/systemd/resolved.conf.d/*.conf
/run/systemd/resolved.conf.d/*.conf
/usr/lib/systemd/resolved.conf.d/*.conf

The second line is pretty much like ".conf files in /etc/systemd/system/foo.service.d/". The only difference is that this isn't a systemd unit, it's the configuration for something else - systemd-resolved - so naturally systemctl isn't relevant. Just create .conf files in /etc/systemd/resolved.conf.d/ by any other means (editor, script, whatever) with your preferred configuration in it.

muru
  • 207,228