Package: dnsmasq Version: 2.75-1 Hi,
dnsmasq(8) says ...
-R, --no-resolv
Don't read /etc/resolv.conf. Get upstream servers only from the
command line or the dnsmasq configuration file.
... yet dnsmasq still fails to start if /etc/resolv.conf is a symbolic
link pointing to a file in a nonexistent directory:
# ln --symbolic --force /nonexistent/foobar /etc/resolv.conf
# dnsmasq --conf-file=/dev/null --no-resolv
dnsmasq: directory /etc/resolv.conf for resolv-file is missing, cannot
poll
This can be worked around by explicitly specifying the list of "resolv"
-files to be empty:
# dnsmasq --conf-file=/dev/null --no-resolv --resolv-file=
# echo $?
0
This is problematic because when running systemd-resolved it's
recommended to make /etc/resolv.conf a symbolic link to
/run/systemd/resolve/resolv.conf for compatibility reasons (see systemd
-resolved(8)). Since dnsmasq.service has no dependency or ordering
relation on systemd-resolved.service (which is of course correct), it's
possible for /etc/resolv.conf to be a symbolic link pointing to a file
in a nonexistent directory when dnsmasq starts.
Best regards
Alexander Kurtz
signature.asc
Description: This is a digitally signed message part

