Problem with the latest version of dnsmasq

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with the latest version of dnsmasq

General mailing list
I did an ipkg update and then installed dnsmasq today.  Anyway after I updated my dnsmasq.conf, I tried to restart dnsmasq.
It would not start because:

- It wanted to use user nobody and group nobody which don't exist on my pogoplug. 

- It wanted to store a pid file in /var/run which does not exist on my pogoplug

Yes I could have modified the pogoplug firmware to add user nobody and group nobody. I could also have created a /var/run directory. The thing is I don't like modifying the firmware unless it's absolutely necessary.

I modified /opt/etc/init.d/S56dnsmasq as follows and got dnsmasq running
----------
#!/bin/sh

if [ -f /opt/var/dnsmasq.pid ] ; then
  kill `cat /opt/var/run/dnsmasq.pid`
fi

rm -f /var/dnsmasq.pid
if [ -n "`pidof dnsmasq`" ] ; then
    echo "Stopping dnsmasq:"
    killall dnsmasq
fi

sleep 2
/opt/sbin/dnsmasq --user=root --group=root --pid-file=/var/dnsmasq.pid
-----------------

Perhaps not the most elegant solution but it is working...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with the latest version of dnsmasq

General mailing list
Opps, there's an error in the line

 kill `cat /opt/var/run/dnsmasq.pid`

it should be

 kill `cat /opt/var/dnsmasq.pid`



On Monday, May 19, 2014 12:47 PM, "bruce turrie [hidden email] [nslu2-general]" <[hidden email]> wrote:
 


 
I did an ipkg update and then installed dnsmasq today.  Anyway after I updated my dnsmasq.conf, I tried to restart dnsmasq.
It would not start because:

- It wanted to use user nobody and group nobody which don't exist on my pogoplug. 

- It wanted to store a pid file in /var/run which does not exist on my pogoplug

Yes I could have modified the pogoplug firmware to add user nobody and group nobody. I could also have created a /var/run directory. The thing is I don't like modifying the firmware unless it's absolutely necessary.

I modified /opt/etc/init.d/S56dnsmasq as follows and got dnsmasq running
----------
#!/bin/sh

if [ -f /opt/var/dnsmasq.pid ] ; then
  kill `cat /opt/var/run/dnsmasq.pid`
fi

rm -f /var/dnsmasq.pid
if [ -n "`pidof dnsmasq`" ] ; then
    echo "Stopping dnsmasq:"
    killall dnsmasq
fi

sleep 2
/opt/sbin/dnsmasq --user=root --group=root --pid-file=/var/dnsmasq.pid
-----------------

Perhaps not the most elegant solution but it is working...





Loading...