Q:

Replacing stock dnsmasq with optware dnsmasq

This question if for DD-WRT installed on e3000 with optware.
I have replaced the stock dnsmasq to get logging, using this: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=660694
I installed optware on my 16gb usb and installed dnsmasq.
Runs fine when service started, but have two problems:

"ps aux | grep dnsmasq" shows two processes

 nobody   29791  0.0  0.8   1284   520 ?        S    12:03   0:01 /opt/sbin/dnsmasq
 root     29792  0.0  0.4   1268   256 ?        S    12:03   0:00 /opt/sbin/dnsmasq

On device reboot, the dnsmasq service does not load up. I have to manually load it using "service dnsmasq start" and loads up to processes like the ps grep above.

A:

I found the answers to my problems. May be useful to someone else:

"There are always 2 processes running for each dhcp network. The subprocess is because dnsmasq setuids to nobody to run the external script specified in --dhcp-script. This is expected behavior." src: answers.launchpad.net/nova/+question/181398

As one of the processes was nobody; during boot up, user 'nobody' was not initialized. Added these two lines to /opt/etc/init.d/S56dnsmasq:

grep -q nobody /etc/group || echo "nobody:x:99:" >> /etc/group
grep -q nobody     /etc/passwd || echo "nobody:x:99:99:nobody:/var:/bin/false" >> /etc/passwd

Works like a charm!

