[-]
[+]
|
Added |
pdns.changes
|
|
[-]
[+]
|
Changed |
pdns.spec
^
|
|
[-]
[+]
|
Added |
pdns-2.9.22_missing_includes.patch
^
|
@@ -0,0 +1,24 @@
+Index: pdns/rcpgenerator.cc
+===================================================================
+--- pdns/rcpgenerator.cc.orig
++++ pdns/rcpgenerator.cc
+@@ -21,6 +21,7 @@
+ #include "misc.hh"
+ #include <boost/lexical_cast.hpp>
+ #include <iostream>
++#include <cstdio>
+ #include "base64.hh"
+ using namespace boost;
+
+Index: pdns/dnsparser.cc
+===================================================================
+--- pdns/dnsparser.cc.orig
++++ pdns/dnsparser.cc
+@@ -20,6 +20,7 @@
+ #include "dnswriter.hh"
+ #include <boost/lexical_cast.hpp>
+ #include <boost/algorithm/string.hpp>
++#include <cstdio>
+
+ using namespace boost;
+
|
[-]
[+]
|
Added |
pdns-2.9.22_new_boost_exceptions.patch
^
|
@@ -0,0 +1,197 @@
+Index: modules/ldapbackend/ldapbackend.cc
+===================================================================
+--- modules/ldapbackend/ldapbackend.cc.orig 2008-03-02 09:20:13.000000000 +0100
++++ modules/ldapbackend/ldapbackend.cc 2009-01-28 16:57:00.518273946 +0100
+@@ -70,7 +70,7 @@ LdapBackend::LdapBackend( const string &
+ {
+ L << Logger::Error << m_myname << " Ldap connection to server failed: " << le.what() << endl;
+ }
+- catch( exception &e )
++ catch( std::exception &e )
+ {
+ L << Logger::Error << m_myname << " Caught STL exception: " << e.what() << endl;
+ }
+@@ -109,7 +109,7 @@ bool LdapBackend::list( const string& ta
+ L << Logger::Error << m_myname << " Unable to get zone " + target + " from LDAP directory: " << le.what() << endl;
+ throw( AhuException( "LDAP server unreachable" ) ); // try to reconnect to another server
+ }
+- catch( exception &e )
++ catch( std::exception &e )
+ {
+ L << Logger::Error << m_myname << " Caught STL exception for target " << target << ": " << e.what() << endl;
+ throw( DBException( "STL exception" ) );
+@@ -186,7 +186,7 @@ void LdapBackend::lookup( const QType &q
+ L << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl;
+ throw( AhuException( "LDAP server unreachable" ) ); // try to reconnect to another server
+ }
+- catch( exception &e )
++ catch( std::exception &e )
+ {
+ L << Logger::Error << m_myname << " Caught STL exception for qname " << qname << ": " << e.what() << endl;
+ throw( DBException( "STL exception" ) );
+@@ -476,7 +476,7 @@ bool LdapBackend::get( DNSResourceRecord
+ L << Logger::Error << m_myname << " Search failed: " << le.what() << endl;
+ throw( AhuException( "LDAP server unreachable" ) ); // try to reconnect to another server
+ }
+- catch( exception &e )
++ catch( std::exception &e )
+ {
+ L << Logger::Error << m_myname << " Caught STL exception for " << m_qname << ": " << e.what() << endl;
+ throw( DBException( "STL exception" ) );
+Index: modules/opendbxbackend/odbxbackend.cc
+===================================================================
+--- modules/opendbxbackend/odbxbackend.cc.orig 2008-05-30 10:59:22.000000000 +0200
++++ modules/opendbxbackend/odbxbackend.cc 2009-01-28 16:59:22.986277393 +0100
+@@ -60,7 +60,7 @@ OdbxBackend::OdbxBackend( const string&
+ if( !connectTo( m_hosts[READ], READ ) ) { throw( AhuException( "Fatal: Connecting to server for reading failed" ) ); }
+ if( !connectTo( m_hosts[WRITE], WRITE ) ) { throw( AhuException( "Fatal: Connecting to server for writing failed" ) ); }
+ }
+- catch( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " OdbxBackend(): Caught STL exception - " + e.what(), Logger::Error );
+ throw( AhuException( "Fatal: STL exception" ) );
+@@ -155,7 +155,7 @@ bool OdbxBackend::getDomainInfo( const s
+ }
+ while( getRecord( READ ) );
+ }
+- catch( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " getDomainInfo: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -220,7 +220,7 @@ bool OdbxBackend::getSOA( const string&
+ }
+ while( getRecord( READ ) );
+ }
+- catch( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " getSOA: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -259,7 +259,7 @@ bool OdbxBackend::list( const string& ta
+
+ if( !execStmt( stmtref.c_str(), stmtref.size(), READ ) ) { return false; }
+ }
+- catch( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " list: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -327,7 +327,7 @@ void OdbxBackend::lookup( const QType& q
+ throw( DBException( "Error: DB statement failed" ) );
+ }
+ }
+- catch( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " lookup: Caught STL exception - " + e.what(), Logger::Error );
+ throw( DBException( "Error: STL exception" ) );
+@@ -387,7 +387,7 @@ bool OdbxBackend::get( DNSResourceRecord
+ return true;
+ }
+ }
+- catch( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " get: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -431,7 +431,7 @@ void OdbxBackend::setFresh( uint32_t dom
+ throw( DBException( "Error: DB statement failed" ) );
+ }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " setFresh: Caught STL exception - " + e.what(), Logger::Error );
+ throw( DBException( "Error: STL exception" ) );
+@@ -471,7 +471,7 @@ void OdbxBackend::setNotified( uint32_t
+ throw( DBException( "Error: DB statement failed" ) );
+ }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " setNotified: Caught STL exception - " + e.what(), Logger::Error );
+ throw( DBException( "Error: STL exception" ) );
+@@ -505,7 +505,7 @@ bool OdbxBackend::isMaster( const string
+ }
+ while( getRecord( READ ) );
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " isMaster: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -530,7 +530,7 @@ void OdbxBackend::getUnfreshSlaveInfos(
+
+ getDomainList( getArg( "sql-infoslaves" ), unfresh, &checkSlave );
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " getUnfreshSlaveInfo: Caught STL exception - " + e.what(), Logger::Error );
+ }
+@@ -552,7 +552,7 @@ void OdbxBackend::getUpdatedMasters( vec
+
+ getDomainList( getArg( "sql-infomasters" ), updated, &checkMaster );
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " getUpdatedMasters: Caught STL exception - " + e.what(), Logger::Error );
+ }
+@@ -593,7 +593,7 @@ bool OdbxBackend::superMasterBackend( co
+ }
+ }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " superMasterBackend: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -634,7 +634,7 @@ bool OdbxBackend::createSlaveDomain( con
+
+ if( !execStmt( m_buffer, len, WRITE ) ) { return false; }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " createSlaveDomain: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -676,7 +676,7 @@ bool OdbxBackend::feedRecord( const DNSR
+
+ if( !execStmt( m_buffer, len, WRITE ) ) { return false; }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " feedRecord: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -720,7 +720,7 @@ bool OdbxBackend::startTransaction( cons
+ stmtref = strbind( ":id", string( m_buffer, len ), stmt );
+ if( !execStmt( stmtref.c_str(), stmtref.size(), WRITE ) ) { return false; }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " startTransaction: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -746,7 +746,7 @@ bool OdbxBackend::commitTransaction()
+ const string& stmt = getArg( "sql-transactend" );
+ if( !execStmt( stmt.c_str(), stmt.size(), WRITE ) ) { return false; }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " commitTransaction: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
+@@ -772,7 +772,7 @@ bool OdbxBackend::abortTransaction()
+ const string& stmt = getArg( "sql-transactabort" );
+ if( !execStmt( stmt.c_str(), stmt.size(), WRITE ) ) { return false; }
+ }
+- catch ( exception& e )
++ catch( std::exception& e )
+ {
+ L.log( m_myname + " abortTransaction: Caught STL exception - " + e.what(), Logger::Error );
+ return false;
|
[-]
[+]
|
Added |
pdns-2.9.22_warnings.patch
^
|
@@ -0,0 +1,28 @@
+Index: modules/pipebackend/pipebackend.cc
+===================================================================
+--- modules/pipebackend/pipebackend.cc.orig 2008-11-16 10:10:10.000000000 +0100
++++ modules/pipebackend/pipebackend.cc 2009-01-28 17:29:18.853326425 +0100
+@@ -222,7 +222,7 @@ bool PipeBackend::get(DNSResourceRecord
+
+ if(parts[3]!="MX") {
+ r.content.clear();
+- for(int n=6; n < parts.size(); ++n) {
++ for(size_t n=6; n < parts.size(); ++n) {
+ if(n!=6)
+ r.content.append(1,' ');
+ r.content.append(parts[n]);
+Index: modules/ldapbackend/ldapbackend.cc
+===================================================================
+--- modules/ldapbackend/ldapbackend.cc.orig 2009-01-28 17:27:15.000000000 +0100
++++ modules/ldapbackend/ldapbackend.cc 2009-01-28 17:31:23.593753025 +0100
+@@ -153,8 +153,8 @@ inline bool LdapBackend::list_simple( co
+
+ inline bool LdapBackend::list_strict( const string& target, int domain_id )
+ {
+- if( target.size() > 13 && target.substr( target.size() - 13, 13 ) == ".in-addr.arpa" ||
+- target.size() > 9 && target.substr( target.size() - 9, 9 ) == ".ip6.arpa" )
++ if( (target.size() > 13 && target.substr( target.size() - 13, 13 ) == ".in-addr.arpa") ||
++ (target.size() > 9 && target.substr( target.size() - 9, 9 ) == ".ip6.arpa") )
+ {
+ L << Logger::Warning << m_myname << " Request for reverse zone AXFR, but this is not supported in strict mode" << endl;
+ return false; // AXFR isn't supported in strict mode. Use simple mode and additional PTR records
|
[-]
[+]
|
Added |
pdns-2.9.22_wrong_pgsql.patch
^
|
@@ -0,0 +1,26 @@
+Index: configure.in
+===================================================================
+--- configure.in.orig 2009-01-25 18:25:37.000000000 +0100
++++ configure.in 2009-01-28 17:16:35.494300022 +0100
+@@ -344,7 +344,7 @@ then
+ PGSQL_libdir=
+ for m in $PGSQL_lib_check; do
+ if test -d "$m" && \
+- (test -f "$m/libpq.a" || test -f "$m/libpq++.a")
++ (test -f "$m/libpq.so" || test -f "$m/libpq++.so")
+ then
+ PGSQL_libdir=$m
+ break
+Index: configure
+===================================================================
+--- configure.orig 2009-01-25 18:27:41.000000000 +0100
++++ configure 2009-01-28 17:17:03.934274384 +0100
+@@ -23319,7 +23319,7 @@ echo $ECHO_N "checking for PgSQL library
+ PGSQL_libdir=
+ for m in $PGSQL_lib_check; do
+ if test -d "$m" && \
+- (test -f "$m/libpq.a" || test -f "$m/libpq++.a")
++ (test -f "$m/libpq.so" || test -f "$m/libpq++.so")
+ then
+ PGSQL_libdir=$m
+ break
|
[-]
[+]
|
Added |
README.opendbx
^
|
@@ -0,0 +1,330 @@
+grabbed from http://wiki.linuxnetworks.de/index.php/PowerDNS_OpenDBX_Backend
+and linked pages
+
+-------------------------------------------------------------------------------
+PowerDNS OpenDBX Backend - Installation
+
+From Wiki
+
+Contents
+
+ • 1 Installation
+ 1.1 Compilation
+ 1.2 Configuration options
+ 1.3 Backend specific configuration
+ ☆ 1.3.1 MySQL
+ ☆ 1.3.2 PostgreSQL
+ ☆ 1.3.3 SQLite and SQLite3
+ ☆ 1.3.4 MS SQL Server
+ ☆ 1.3.5 Sybase ASE
+ 1.4 Database setup
+ 1.5 Migration
+
+
+
+Installation
+
+
+Compilation
+
+Before performing the steps to compile the PowerDNS server and the OpenDBX
+backend you have to install the OpenDBX library, the OpenDBX backend you want
+to use and its development package, which includes the necessary header. The
+OpenDBX package can be downloaded from Linuxnetworks.de.
+
+Apply these steps to the source pdns-x.xx.tar.gz file, if you don't want to use
+a precompiled package:
+
+* Extract the pdns tar file
+* Change into the newly created pdns directory
+* Extract the opendbxbackend tar file
+* Run "cat <patch> | patch -p1" (if available)
+* Type ./configure --help for the available options
+* For dynamic modules:
+ ./configure
+ --prefix=/usr
+ --with-modules=""
+ --with-dynmodules="opendbx"
+ --enable-recursor
+* For a static module:
+ ./configure
+ --prefix=/usr
+ --with-modules="opendbx"
+ --with-dynmodules=""
+ --enable-recursor
+* make && make install
+
+
+Configuration options
+
+There are a few options through the OpenDBX backend can be configured for your
+environment. Add them to the pdns.conf file located in /etc/powerdns or /usr/
+local/etc/ (depends on your configuration while compiling):
+
+opendbx-backend (default "mysql")
+ Name of the backend used to connect to the database server. Currently
+ mysql, pgsql, sqlite, sqlite3 and sybase are available.
+
+opendbx-host-read (default "127.0.0.1")
+ One or more host names or IP addresses of the database servers. These hosts
+ will be used for retrieving the records via SELECT queries.
+
+opendbx-host-write (default "127.0.0.1")
+ Same as opendbx-host-read, except for INSERT/UPDATE statements (mostly used
+ by zonetransfers).
+
+opendbx-port (default "")
+ TCP/IP port number where the database server is listening to. Most
+ databases will use their default port if you leave this empty.
+
+opendbx-database (default "powerdns")
+ The database name where all domain and record entries are stored.
+
+opendbx-username (default "powerdns")
+ Name of the user send to the DBMS for authentication.
+
+opendbx-password (default "")
+ Clear text password for authentication in combination with the username.
+
+opendbx-host (deprecated, default "127.0.0.1")
+ Host name or IP address of the database server. This parameter is
+ deprecated in favor of opendbx-host-read and opendbx-host-write.
+
+
+Backend specific configuration
+
+
+MySQL
+
+Supported without changes since OpenDBX 1.0.0
+
+
+PostgreSQL
+
+Supported without changes since OpenDBX 1.0.0
+
+
+SQLite and SQLite3
+
+Supported without changes since OpenDBX 1.0.0 but requires to set opendbx-host
+to the path of the SQLite file (including the trailing slash or backslash,
+depending on your operating system) and opendbx-database to the name of the
+file, e.g.
+
+opendbx-host-read = /path/to/file/
+opendbx-host-write = /path/to/file/
+opendbx-database = powerdns.sqlite
+
+
+MS SQL Server
+
+Supported by PowerDNS 2.9.20 (with latest patch) and OpenDBX 1.1.4 by using the
+FreeTDS library. It uses a different scheme for host configuration (requires
+the name of the host section in the configuration file of the dblib client
+library) and doesn't support the default statement for starting transactions.
+Please add the following lines to your pdns.conf:
+
+opendbx-host-read = MSSQL2k
+opendbx-host-write = MSSQL2k
+opendbx-sql-transactbegin = BEGIN TRANSACTION
+
+
+Sybase ASE
+
+Supported by PowerDNS 2.9.20 (with latest patch) and OpenDBX 1.1.5 by using the
+native Sybase ctlib or the FreeTDS library. It uses a different scheme for host
+configuration (requires the name of the host section in the configuration file
+of the ctlib client library) and doesn't support the default statement for
+starting transactions. Please add the following lines to your pdns.conf:
+
+opendbx-host-read = SYBASE
+opendbx-host-write = SYBASE
+opendbx-sql-transactbegin = BEGIN TRANSACTION
+
+
+Database setup
+
+You need one of the DBMS supported by the OpenDBX library for storing your
+records and domain infomation. Please have a look at the documentation of your
+DBMS for the task of creating a database and an user.
+
+After that you're almost done. Use the appropriate table definition below to
+create the tables in the new database after which you can populate your
+database with dns information with e.g. zone2sql.
+
+ • MySQL
+ • PostgreSQL
+ • SQLite
+ • Sybase
+
+
+Migration
+
+To convert an existing gMySQL Database to an OpenDBX MySQL database, an
+additional status column is required since patch 2.9.20-3:
+
+ALTER TABLE domains ADD ( status CHAR(1) NOT NULL DEFAULT 'A' )
+
+Adding a foreign key constraint from records.domain_id to domains.id is a good
+idea too:
+
+ALTER TABLE records ADD CONSTRAINT fk_records_domainid
+FOREIGN KEY (domain_id) REFERENCES domains (id)
+ON UPDATE CASCADE ON DELETE CASCADE
+
+You should also recreate your indices for optimal performance. Please have a
+look in the appropriate file listed in the section above.
+
+-------------------------------------------------------------------------------
+
+PowerDNS OpenDBX Backend - Optimization
+
+From Wiki
+
+Contents
+
+ • 1 Optimization
+ 1.1 Use NULL for prio and ttl fields
+
+
+
+Optimization
+
+
+Use NULL for prio and ttl fields
+
+Each DNS entry in the record table has its own values for time-to-live (TTL)
+and priority. You can speed up processing of each query in the OpenDBX backend
+if you set both values in your records table to NULL by default and only set
+them to an appropriate value if you really need them.
|
|
Added |
pdns-2.9.22.tar.bz2
^
|
[-]
[+]
|
Added |
rcpdns
^
|
@@ -0,0 +1,335 @@
+#! /bin/sh
+# Copyright (c) 1995-2004 SUSE Linux AG, Nuernberg, Germany.
+# All rights reserved.
+#
+# Author: Kurt Garloff
+# Please send feedback to http://www.suse.de/feedback/
+#
+# /etc/init.d/pdns
+# and its symbolic link
+# /(usr/)sbin/rcpdns
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Template system startup script for some example service/daemon FOO
+#
+# LSB compatible service control script; see http://www.linuxbase.org/spec/
+#
+# Note: This template uses functions rc_XXX defined in /etc/rc.status on
+# UnitedLinux (UL) based Linux distributions. If you want to base your
+# script on this template and ensure that it works on non UL based LSB
+# compliant Linux distributions, you either have to provide the rc.status
+# functions from UL or change the script to work without them.
+#
+### BEGIN INIT INFO
+# Provides: pdns
+# Required-Start: $network $syslog $remote_fs
+# Should-Start: ldap
+# Required-Stop: $network $syslog $remote_fs
+# Should-Stop: ldap
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: PDNS is a versatile high performance authoritative nameserver
+# Description: PDNS is a versatile high performance authoritative nameserver
+### END INIT INFO
+#
+# Any extensions to the keywords given above should be preceeded by
+# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
+#
+# Notes on Required-Start/Should-Start:
+# * There are two different issues that are solved by Required-Start
+# and Should-Start
+# (a) Hard dependencies: This is used by the runlevel editor to determine
+# which services absolutely need to be started to make the start of
+# this service make sense. Example: nfsserver should have
+# Required-Start: $portmap
+# Also, required services are started before the dependent ones.
+# The runlevel editor will warn about such missing hard dependencies
+# and suggest enabling. During system startup, you may expect an error,
+# if the dependency is not fulfilled.
+# (b) Specifying the init script ordering, not real (hard) dependencies.
+# This is needed by insserv to determine which service should be
+# started first (and at a later stage what services can be started
+# in parallel). The tag Should-Start: is used for this.
+# It tells, that if a service is available, it should be started
+# before. If not, never mind.
+# * When specifying hard dependencies or ordering requirements, you can
+# use names of services (contents of their Provides: section)
+# or pseudo names starting with a $. The following ones are available
+# according to LSB (1.1):
+# $local_fs all local file systems are mounted
+# (most services should need this!)
+# $remote_fs all remote file systems are mounted
+# (note that /usr may be remote, so
+# many services should Require this!)
+# $syslog system logging facility up
+# $network low level networking (eth card, ...)
+# $named hostname resolution available
+# $netdaemons all network daemons are running
+# The $netdaemons pseudo service has been removed in LSB 1.2.
+# For now, we still offer it for backward compatibility.
+# These are new (LSB 1.2):
+# $time the system time has been set correctly
+# $portmap SunRPC portmapping service available
+# UnitedLinux extensions:
+# $ALL indicates that a script should be inserted
+# at the end
+# * The services specified in the stop tags
+# (Required-Stop/Should-Stop)
+# specify which services need to be still running when this service
+# is shut down. Often the entries there are just copies or a subset
+# from the respective start tag.
+# * Should-Start/Stop are now part of LSB as of 2.0,
+# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
+# insserv does support both variants.
+# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
+# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
+# a startup script should default to be enabled after installation.
+# It's not used by insserv.
+#
+# Note on runlevels:
+# 0 - halt/poweroff 6 - reboot
+# 1 - single user 2 - multiuser without network exported
+# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
+#
+# Note on script names:
+# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
+# A registry has been set up to manage the init script namespace.
+# http://www.lanana.org/
+# Please use the names already registered or register one or use a
+# vendor prefix.
+
+
+# Check for missing binaries (stale symlinks should not happen)
+# Note: Special treatment of stop for LSB conformance
+PDNS_SERVER=/usr/sbin/pdns_server
+test -x $PDNS_SERVER || { echo "$PDNS_SERVER not installed";
+ if [ "$1" = "stop" ]; then exit 0;
+ else exit 5; fi; }
+
+
+doPC()
+{
+ ret=$(/usr/bin/pdns_control $EXTRAOPTS $1 $2 2> /dev/null)
+}
+
+doPC ping
+NOTRUNNING=$?
+
+
+# Source LSB init functions
+# providing start_daemon, killproc, pidofproc,
+# log_success_msg, log_failure_msg and log_warning_msg.
+# This is currently not used by UnitedLinux based distributions and
+# not needed for init scripts for UnitedLinux only. If it is used,
+# the functions from rc.status should not be sourced or used.
+#. /lib/lsb/init-functions
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v be verbose in local rc status and clear it afterwards
+# rc_status -v -r ditto and clear both the local and overall rc status
+# rc_status -s display "skipped" and exit with status 3
+# rc_status -u display "unused" and exit with status 3
+# rc_failed set local and overall rc status to failed
+# rc_failed <num> set local and overall rc status to <num>
+# rc_reset clear both the local and overall rc status
+# rc_exit exit appropriate to overall rc status
+# rc_active checks whether a service is activated by symlinks
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0 - success
+# 1 - generic or unspecified error
+# 2 - invalid or excess argument(s)
+# 3 - unimplemented feature (e.g. "reload")
+# 4 - user had insufficient privileges
+# 5 - program is not installed
+# 6 - program is not configured
+# 7 - program is not running
+# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+#
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+# ensure our control directory exists
+PDNS_CTRLDIR="/var/run/pdns"
+if [ ! -e "$PDNS_CTRLDIR" ] ; then
+ mkdir --mode=0755 "$PDNS_CTRLDIR"
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting PowerDNS authoritative nameserver"
+ ## Start daemon with startproc(8). If this fails
+ ## the return value is set appropriately by startproc.
+ startproc $PDNS_SERVER $EXTRAOPTS --daemon
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down PowerDNS authoritative nameserver"
+ ## Stop daemon with killproc(8) and if this fails
+ ## killproc sets the return value according to LSB.
+
+ killproc -TERM $PDNS_SERVER
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ try-restart|condrestart)
|