Hello all,

Noticed a problem with the initscript included in the latest pdns server svn trunk - when starting the service, it improperly detects there being a suffix (/etc/init.d/pdns).

In the older pdns init script which uses:

suffix=`basename $0 | awk -F- '{print $2}'`

The script starts pdns with the following options:

/usr/sbin/pdns_server --daemon --guardian=yes

With the newer initscript, the suffix detection uses:

suffix=`basename $0 | cut -d- -f2-`

Which starts pdns with:

/usr/sbin/pdns_server --config-name=pdns --daemon --guardian=yes

And causes pdns to not read its config file in /etc/pdns/pdns.conf cause its looking for the wrong file.

Fix is pretty easy - either go back to using awk, or use the attached patch which fixes the issue:

suffix=`basename $0 | cut -d- -f2- -s --output-delimiter=`


Thanks!

--
Brielle Bruns
The Summit Open Source Development Group
http://www.sosdg.org    /     http://www.ahbl.org

--- pdns/pdns.in.orig   2012-01-01 15:14:16.389973027 -0700
+++ pdns/pdns.in        2012-01-01 15:15:26.273973396 -0700
@@ -27,7 +27,7 @@
 [ -r /etc/default/pdns ] && . /etc/default/pdns
 
 cd $SOCKETPATH
-suffix=`basename $0 | cut -d- -f2-`
+suffix=`basename $0 | cut -d- -f2- -s --output-delimiter=`
 if [ $suffix ] 
 then
        EXTRAOPTS=--config-name=$suffix

_______________________________________________
Pdns-dev mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-dev

Reply via email to