Skip to contentSkip to conversation

dnsmasq init script typo

DISCUSSION Mircea Gliga 2 participants 2 messages Sep 8, 2017

lore
Share & tools
lore
#0 lore raw

Hi

I think there is a problem in the dnsmasq init script related to the pidfile |

test -z"${PIDFILE}" && PIFILE="/run/dnsmasq.pid"

|
The script defines a variable PIFILE, notice the missing "D" from PID. And then it doesn't use that variable anymore. It only uses the PIDFILE one.
So, if you run /etc/init.d/dnsmasq status you get in trouble because of this line:

|

PID=cat${PIDFILE}

|

Also the script doesn't handle the situation when the the pidfile is also specified in the dnsmasq.conf file - the daemon creates the pidfile in the location specified in the dnsmaq.conf file. But, this is done for the no-resolv entry in the conf file.

This is the script in question:
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/dnsmasq/files/init?h=krogoth#n19

Best regards
Mircea
||

#1 lore raw
Quoted 10 lines · Mircea Gliga

Hi

I think there is a problem in the dnsmasq init script related to the pidfile

test -z "${PIDFILE}" && PIFILE="/run/dnsmasq.pid"

The script defines a variable PIFILE, notice the missing "D" from PID. And then it doesn't use that variable anymore.
It only uses the PIDFILE one.

this is a typo so please submit a patch to fix it if you can.

Quoted 22 lines

So, if you run /etc/init.d/dnsmasq status you get in trouble because of this line:

  PID=`cat ${PIDFILE}`

Also the script doesn't handle the situation when the the pidfile is also specified in the dnsmasq.conf file - the daemon creates the pidfile in the location specified in the dnsmaq.conf file.
But, this is done for the no-resolv entry in the conf file.

This is the script in question:
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/dnsmasq/files/init?h=krogoth#n19

Best regards
Mircea

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto