[Dnsmasq-discuss] Is updating dnsmasq.conf supposed to update dnsmasq.plist?
perette at barella.org
Wed Aug 4 00:49:02 BST 2010
On 2010年08月03日, at 18:08, John Puffs wrote:
> Seems silly that certain options in the .plist file are not automatically updated. I will file a bug report as this is not good.
It may make more sense when you consider that the .plist is *not* dnsmasq's config file. It's a config file for launchd, telling launchd how to invoke dnsmasq. Thus, the way I'd suggest reporting the bug is that the .plist file should not unnecessarily pass dnsmasq parameters that are particulars of dnsmasq configuration.
This way, the automatic update you're envisioning becomes unnecessary. If the .plist doesn't specify -r /etc/resolv.conf at all (because it's not inherently part of launching/managing the process anyway) then it'll use the ones from dnsmasq.conf. So if MacPorts takes these lines out of the .plist:
<string>/etc/resolv.conf</string> (or whatever you've changed it to)
and it'll work sensibly. (Which, apparently, is the way I suggested it in the first place: https://trac.macports.org/ticket/21276 ... Why they changed it, I don't know.)
> One quick question that I think I know the answer to.. You said "Since command-line options override the config file options in dnsmasq (as with most other utilities), your config file is ignored in preference of the .plist/command line option." I understand that options that are listed in the .plist will override the config file. But do the rest of the config file options still work correctly?
Yes, the rest of your settings are getting picked up from the .conf file. The -r option (equivalent to "resolv-file" in the config file) is the only option being passed to dnsmasq and thus overriding the resolv-file config file setting. (In a pure sequence-of-operations, dnsmasq IS reading your config file's setting... But then it's overridden by the -r parameter/command line option passed to it.)
And a comment/question on the man page... Under "CONFIG FILE", it indicates:
> "For options which may only be specified once, the configuration file overrides the command line."
Skimming through I don't see any mention of which ones those are. If any of these still exist, they should be noted somehow.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dnsmasq-discuss