[Pdns-dev] Allow - in suffixes

Marc Haber mh+pdns-dev at zugschlus.de
Fri Nov 4 12:33:48 CET 2011


Hi,

I would like to suggest changing in pdns/pdns.in the code

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

to

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

for simplicity and to allow suffixes that contain a hyphen.

Trivial patch attached.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062
-------------- next part --------------
Index: pdns/pdns.in
===================================================================
--- pdns/pdns.in	(revision 2293)
+++ pdns/pdns.in	(working copy)
@@ -25,7 +25,7 @@
 [ -r /etc/default/pdns ] && . /etc/default/pdns
 
 cd $SOCKETPATH
-suffix=`basename $0 | awk -F- '{print $2}'`
+suffix=`basename $0 | cut -d- -f2-`
 if [ $suffix ] 
 then
 	EXTRAOPTS=--config-name=$suffix


More information about the Pdns-dev mailing list