I have a weird network setup at home that involves a (NetworkManager-manged, as with all my network devices) bridge device, as well as dnsmasq serving one /etc/hosts to all the devices at home for all my local hostnames.
Every time I reboot, dnsmasq fails to start, with:
dnsmasq: unknown interface br0
unknown interface br0
FAILED to start up
OK, that should be easy to solve by making dnsmasq wait for the br0 device to be initialized, right?
/etc/systemd/system/dnsmasq.service.d/override.conf has:
[Unit]
BindsTo=sys-devices-virtual-net-br0.device
After=sys-devices-virtual-net-br0.device
That didn’t resolve my problem. Every time I reboot, I have to log in and restart dnsmasq.
I’m sure I’m missing something about how systemd works, but why does this not cause systemd to wait to initialize dnsmasq until br0 is configured?
I went looking and found linux - Systemd wait for network interface to be up before running service - Unix & Linux Stack Exchange which matches what I did, so I’m guessing there has been some change (I expect for some good reason) which I need to adapt to.
(I’m on Fedora 35, updated today, but this was true on Fedora 34 and I think Fedora 33 as well.)