[Dnsmasq-discuss] (no subject)

richardvoigt at gmail.com richardvoigt at gmail.com
Thu Jan 17 21:12:02 GMT 2013


I strongly suggest you test it from your login shell first, to separate
problems in the approach from problems in the cron environment.

Run 'ps'  to see how many dnsmasq processes you have.  If there's more than
one, then 'pidof' won't be as useful.  Most startup scripts write the PID
of the master process into a pidfile which you can use later, to avoid the
"which of many dnsmasq processes do I signal?" problem.


On Thu, Jan 17, 2013 at 1:53 PM, Eric Vance <epvance at gmail.com> wrote:

> That is very possible.  Good suggestion.  Does anyone have any suggestion
> of how I should SIGHUP dnsmasq?
> I've tried these without much luck:
>
> kill -1 `pidof dnsmasq`;
>
> kill -9 `pidof dnsmasq`;
>
> kill -HUP `pidof dnsmasq`;
>
> kill -SIGHUP `pidof dnsmasq`;
>
> /etc/init.d/dnsmasq restart;
>
>
> I even put a 5 second sleep after the HUP to try to give it time to start
> back up.
>
> Ideas?
>
> Eric
>
>
> On Thu, Jan 17, 2013 at 11:19 AM, richardvoigt at gmail.com <
> richardvoigt at gmail.com> wrote:
>
>> From your symptoms, I believe you aren't sending SIGHUP correctly, and
>> dnsmasq picks up the change after a minute due to its /etc/hosts polling.
>>
>> dnsmasq uses multiple processes when seteuid behavior is enabled, so you
>> might be signalling the wrong one.
>>
>>
>> On Thu, Jan 17, 2013 at 11:51 AM, Eric Vance <epvance at gmail.com> wrote:
>>
>>> I'm using dnsmasq on an OpenWRT Router.
>>>
>>> I have the following set in /etc/dnsmasq.conf:
>>>
>>> local-ttl=0
>>> cache-size=0
>>>
>>> I believe that tells the client not to cache the dns (which I've
>>> confirmed) and it tells dnsmasq to not cache responses.
>>>
>>> Let's say I have this entry in my /etc/hosts file:
>>>
>>>  192.168.1.1    mydomain.com
>>>
>>> I have a cron job that changes this entry to this:
>>>
>>>  192.168.1.44    mydomain.com
>>>
>>> After the entry is changed in the hosts file I run this to hup:
>>>
>>>  kill -1 `pidof dnsmasq`;
>>>
>>> From my testing, after I change the ip and run the hup it takes about 30
>>> - 60 seconds until the domain resolves to 192.168.1.44.  So, even after I
>>> make the change the name still resolves to 192.168.1.1 for a minute.
>>>
>>> What am I doing wrong?  Is there a better way to do this?  Is there a
>>> better way to Hup?  Am I missing an important setting?  Any help or
>>> suggestions would be appreciated!
>>>
>>> Thanks!
>>>
>>> Eric
>>>
>>> _______________________________________________
>>> Dnsmasq-discuss mailing list
>>> Dnsmasq-discuss at lists.thekelleys.org.uk
>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20130117/f8654a35/attachment-0001.html>


More information about the Dnsmasq-discuss mailing list