[Dnsmasq-discuss] What's this error in syslog mean?
Chris Green
cl at isbd.net
Sun Sep 5 11:51:54 UTC 2021
On Sun, Sep 05, 2021 at 10:14:02AM +0100, Chris Green wrote:
[snip]
>
> I'm going to try a dnsmasq installation on a non Raspberry Pi system and
> see what happens.
>
... and after going round lots of circles I think I have found what
causes the problem - it's the systemd configuration for dnsmasq that
produces the "Too few arguments."
I found that the error appears when you stop dnsmasq as well as when
you start it.
The systemd service file for dnsmasq is:-
[Unit]
Description=dnsmasq - A lightweight DHCP and caching DNS server
Requires=network.target
Wants=nss-lookup.target
Before=nss-lookup.target
After=network.target
[Service]
Type=forking
PIDFile=/run/dnsmasq/dnsmasq.pid
# Test the config file and refuse starting if it is not valid.
ExecStartPre=/etc/init.d/dnsmasq checkconfig
# We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a
# wrapper picking up extra configuration files and then execs dnsmasq
# itself, when called with the "systemd-exec" function.
ExecStart=/etc/init.d/dnsmasq systemd-exec
# The systemd-*-resolvconf functions configure (and deconfigure)
# resolvconf to work with the dnsmasq DNS server. They're called like
# this to get correct error handling (ie don't start-resolvconf if the
# dnsmasq daemon fails to start).
ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
It's the calls to systemd-start-resolvconf and systemd-stop-resolvconf that are causing
the error. For some reason on the Pi it causes this error, but not on my xubuntu system.
Looking further the /etc/init.d/dnsmasq file has been quite extensively revised between
the older version on my Pi and the newer version on xubuntu, many of those revisions
look as if they're protecting against empty parameters.
--
Chris Green
More information about the Dnsmasq-discuss
mailing list