Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#25940 closed defect (fixed)

dnsmasq-2.55 Error in .plist causes dnsmasq not to run.

Reported by: johnnypuffs@… Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc:
Port: dnsmasq

Description

Running OS X 10.6.4 and Xcode 3.2.3

I installed dnsmasq via Macports and updated the dnsmasq.config file to the specs I needed to work on my system. I confirmed that dnsmasq was running but it was not working as a DNS forwarder (I only have it setup for DNS, not DHCP)

For the life of me I could not figure out why it was not working properly. After hours of banging my head I realized it was not reading an option in my config file I needed.

My DSL modem/router overwrites my resolv.conf file so I needed to use a different file. I set this option in the config file to:

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/private/etc/resolv2.conf

Yet it still did not work correctly.

I finally realized that the .plist file overrides the config options and that the standard .plist includes:

     <string>-r</string>
     <string>/etc/resolv.conf</string>

I assumed that any option I set in config would be written to .plist if need be, but apparently that is not the case. I manually updated the .plist to reflect my config file:

     <string>-r</string>
     <string>/etc/resolv2.conf</string>

That solved the problem.

I am sure that many people using dnsmasq have a resolv.conf that is overwritten. Either that string needs to be taken out of the .plist or the .plist needs to be updated if .config is changed.

Change History (4)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Cc: snc@… removed
Keywords: dnsmasq .plist removed
Owner: changed from macports-tickets@… to snc@…

comment:2 Changed 14 years ago by nerdling (Jeremy Lavergne)

Status: newassigned

comment:3 Changed 14 years ago by nerdling (Jeremy Lavergne)

Resolution: fixed
Status: assignedclosed

I'm moving the setting from the plist to the conf file as the path must be set somewhere in order for it to be found. This way, you can change it once in the user configuration and forget about it.

r70332.

comment:4 in reply to:  3 Changed 14 years ago by johnnypuffs@…

Sounds like a good solution. Thanks for doing this. I think it will make things a lot less confusing.

Best, JP

Replying to snc@…:

I'm moving the setting from the plist to the conf file as the path must be set somewhere in order for it to be found. This way, you can change it once in the user configuration and forget about it.

r70332.

Note: See TracTickets for help on using tickets.