[Pdns-dev] Patch: fix use of 'cut' in suffix detection in pdns/pdns.in

Brielle Bruns bruns at 2mbit.com
Sun Jan 1 23:26:31 CET 2012


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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pdns-init.patch
URL: <http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20120101/60281e4a/attachment.asc>


More information about the Pdns-dev mailing list