Mailinglist Archive: opensuse-commit (817 mails)

< Previous Next >
commit pdns
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 01 Dec 2008 18:05:19 +0100
  • Message-id: <20081201170519.ADF8A678174@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package pdns
checked in at Mon Dec 1 18:05:19 CET 2008.


--------
--- pdns/pdns.changes 2008-11-06 15:59:03.000000000 +0100
+++ /mounts/work_src_done/STABLE/pdns/pdns.changes 2008-11-20
17:34:59.319096000 +0100
@@ -1,0 +2,12 @@
+Tue Nov 18 20:29:21 CET 2008 - mrueckert@xxxxxxx
+
+- update to version 2.9.21.2: (bnc#445568)
+ do not crash with HINFO CHAOS requests when configured with
+ 'distributor-threads=1'
+- make default config more sane
+- remove guardian commandline parameter. it was hiding the startup
+ errors. If you want to use the guardian reenable it in the
+ configuration file.
+- mark init script as config
+
+-------------------------------------------------------------------
@@ -15,2 +27,2 @@
-- replaced conditional on %{opensuse_bs} with:
- %if %(echo "%distribution" | grep -Ec '^server:dns')
+- replaced conditional on #{opensuse_bs} with:
+ #if #(echo "%distribution" | grep -Ec '^server:dns')

calling whatdependson for head-i586


Old:
----
pdns-2.9.21.1.tar.bz2

New:
----
pdns-2.9.21.2_fix_default_config.patch
pdns-2.9.21.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pdns.spec ++++++
--- /var/tmp/diff_new_pack.E31710/_old 2008-12-01 18:04:32.000000000 +0100
+++ /var/tmp/diff_new_pack.E31710/_new 2008-12-01 18:04:32.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package pdns (Version 2.9.21.1)
+# spec file for package pdns (Version 2.9.21.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@


Name: pdns
-Version: 2.9.21.1
-Release: 3
+Version: 2.9.21.2
+Release: 1
#
Group: Productivity/Networking/DNS/Servers
License: GPL v2 or later
@@ -64,10 +64,11 @@
Source: %{name}-%{version}.tar.bz2
Source1: rcpdns
Source2: README.opendbx
-Patch1: pdns-%{version}_unversioned_modules.patch
-Patch2: pdns-%{version}_gcc43.patch
-Patch3: pdns-%{version}-wrong-pgsql.patch
+Patch1: pdns-2.9.21.1_unversioned_modules.patch
+Patch2: pdns-2.9.21.1_gcc43.patch
+Patch3: pdns-2.9.21.1-wrong-pgsql.patch
Patch4: pdns-2.9.21.1_new_boost_exceptions.patch
+Patch5: pdns-2.9.21.2_fix_default_config.patch
#
Summary: Modern, advanced and high performance authoritative-only
nameserver

@@ -262,10 +263,15 @@
%patch2
%patch3
%patch4
+%patch5
%if 0%{?with_opendbx}
%{__cp} %{S:2} README.opendbx
%endif
%{__cp} modules/geobackend/README README.geobackend
+# module-dir=/usr/local/lib
+perl -p -i.back -e 's|module-dir=.*|module-dir=%{_libdir}/%{pkg_name}|g'
pdns/pdns.conf-dist
+diff -urN pdns/pdns.conf-dist{.back,} ||:
+rm -v pdns/pdns.conf-dist.back

%build
touch NEWS AUTHORS COPYING
@@ -355,7 +361,7 @@
%defattr (-,root,root,-)
%doc ChangeLog HACKING INSTALL README* TODO
%doc pdns/docs/html
-/etc/init.d/%{pkg_name}
+%config(noreplace) /etc/init.d/%{pkg_name}
%dir %attr(750,root,pdns) %{_sysconfdir}/%{pkg_name}
%config(noreplace) %attr(640,root,pdns)
%{_sysconfdir}/%{pkg_name}/%{pkg_name}.conf
%{_bindir}/pdns_control
@@ -417,14 +423,23 @@
%endif

%changelog
+* Tue Nov 18 2008 mrueckert@xxxxxxx
+- update to version 2.9.21.2: (bnc#445568)
+ do not crash with HINFO CHAOS requests when configured with
+ 'distributor-threads=1'
+- make default config more sane
+- remove guardian commandline parameter. it was hiding the startup
+ errors. If you want to use the guardian reenable it in the
+ configuration file.
+- mark init script as config
* Thu Nov 06 2008 mrueckert@xxxxxxx
- added pdns-2.9.21.1_new_boost_exceptions.patch:
clearify the referenced exception class
* Fri Oct 17 2008 ro@xxxxxxx
- last change does not work yet, disable forcefully
* Thu Aug 21 2008 mrueckert@xxxxxxx
-- replaced conditional on %%{opensuse_bs} with:
- %%if %%(echo "%%distribution" | grep -Ec '^server:dns')
+- replaced conditional on #{opensuse_bs} with:
+ [#]if #(echo "%%distribution" | grep -Ec '^server:dns')
* Mon Aug 11 2008 anosek@xxxxxxx
- updated to version 2.9.21.1
- fixes security issue CVE-2008-3337 (bnc#415369)

++++++ pdns-2.9.21.2_fix_default_config.patch ++++++
Index: pdns/pdns.conf-dist
===================================================================
--- pdns/pdns.conf-dist.orig 2008-11-20 16:59:10.237018967 +0100
+++ pdns/pdns.conf-dist 2008-11-20 17:00:19.229014710 +0100
@@ -27,7 +27,7 @@
#################################
# config-dir Location of configuration directory (pdns.conf)
#
-# config-dir=/usr/local/etc
+# config-dir=/etc/pdns

#################################
# config-name Name of this virtual configuration - will rename the binary
image
++++++ pdns-2.9.21.1.tar.bz2 -> pdns-2.9.21.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/codedocs/Makefile
new/pdns-2.9.21.2/codedocs/Makefile
--- old/pdns-2.9.21.1/codedocs/Makefile 2008-08-07 09:05:01.000000000 +0200
+++ new/pdns-2.9.21.2/codedocs/Makefile 2008-11-16 15:05:06.000000000 +0100
@@ -47,16 +47,16 @@
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/ahu/download/pdns-2.9.21.1/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /home/ahu/download/pdns-2.9.21.2/missing --run aclocal-1.9
ALLSTATIC_FALSE =
ALLSTATIC_TRUE = #
AMDEP_FALSE = #
AMDEP_TRUE =
-AMTAR = ${SHELL} /home/ahu/download/pdns-2.9.21.1/missing --run tar
+AMTAR = ${SHELL} /home/ahu/download/pdns-2.9.21.2/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /home/ahu/download/pdns-2.9.21.1/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/ahu/download/pdns-2.9.21.1/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/ahu/download/pdns-2.9.21.1/missing --run automake-1.9
+AUTOCONF = ${SHELL} /home/ahu/download/pdns-2.9.21.2/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/ahu/download/pdns-2.9.21.2/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/ahu/download/pdns-2.9.21.2/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -95,7 +95,7 @@
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/ahu/download/pdns-2.9.21.1/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/ahu/download/pdns-2.9.21.2/missing --run makeinfo
MYSQL_incdir = /usr/include/mysql
MYSQL_lib =
NEDMALLOC_FALSE =
@@ -123,7 +123,7 @@
SQLITE_lib =
STRIP = strip
THREADFLAGS = -pthread
-VERSION = 2.9.21.1
+VERSION = 2.9.21.2
YACC = bison -y
YFLAGS =
ac_ct_CC = gcc
@@ -157,7 +157,7 @@
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = /home/ahu/download/pdns-2.9.21.1/install-sh
+install_sh = /home/ahu/download/pdns-2.9.21.2/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/configure new/pdns-2.9.21.2/configure
--- old/pdns-2.9.21.1/configure 2008-08-07 08:54:45.000000000 +0200
+++ new/pdns-2.9.21.2/configure 2008-11-16 15:05:06.000000000 +0100
@@ -2294,7 +2294,7 @@

# Define the identity of the package.
PACKAGE=pdns
- VERSION=2.9.21.1
+ VERSION=2.9.21.2


cat >>confdefs.h <<_ACEOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/configure.in
new/pdns-2.9.21.2/configure.in
--- old/pdns-2.9.21.1/configure.in 2008-08-07 08:48:17.000000000 +0200
+++ new/pdns-2.9.21.2/configure.in 2008-11-16 15:05:06.000000000 +0100
@@ -1,6 +1,6 @@
dnl intro
AC_INIT(pdns/receiver.cc)
-AM_INIT_AUTOMAKE(pdns, 2.9.21.1)
+AM_INIT_AUTOMAKE(pdns, 2.9.21.2)
AC_CANONICAL_HOST
AM_CONFIG_HEADER(config.h)
AC_C_BIGENDIAN
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/debian-pdns/changelog
new/pdns-2.9.21.2/debian-pdns/changelog
--- old/pdns-2.9.21.1/debian-pdns/changelog 2008-08-07 08:48:55.000000000
+0200
+++ new/pdns-2.9.21.2/debian-pdns/changelog 2008-11-16 15:05:06.000000000
+0100
@@ -1,4 +1,4 @@
-pdns (2.9.21.1-1) unstable; urgency=medium
+pdns (2.9.21.2-1) unstable; urgency=medium

* fill in the blanks

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/pdns/packethandler.cc
new/pdns-2.9.21.2/pdns/packethandler.cc
--- old/pdns-2.9.21.1/pdns/packethandler.cc 2008-08-07 08:52:33.000000000
+0200
+++ new/pdns-2.9.21.2/pdns/packethandler.cc 2008-11-16 15:05:06.000000000
+0100
@@ -188,23 +188,6 @@
return 0;
}

-int PacketHandler::doDNSCheckRequest(DNSPacket *p, DNSPacket *r, string
&target)
-{
- int result = 0;
- DNSResourceRecord rr;
-
- if (p->qclass == 3 && p->qtype.getName() == "HINFO") {
- rr.content = "PowerDNS $Id: packethandler.cc 1036 2007-04-19 20:43:14Z ahu
$";
- rr.ttl = 5;
- rr.qname=target;
- rr.qtype=13; // hinfo
- r->addRecord(rr);
- result = 1;
- }
-
- return result;
-}
-
/** This catches version requests. Returns 1 if it was handled, 0 if it wasn't
*/
int PacketHandler::doVersionRequest(DNSPacket *p, DNSPacket *r, string &target)
{
@@ -619,9 +602,6 @@
string target=p->qdomain;
bool noCache=false;

- if (doDNSCheckRequest(p, r, target))
- goto sendit;
-
if(doVersionRequest(p,r,target)) // catch version.bind requests
goto sendit;

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/pdns/packethandler.hh
new/pdns-2.9.21.2/pdns/packethandler.hh
--- old/pdns-2.9.21.1/pdns/packethandler.hh 2007-04-21 15:56:36.000000000
+0200
+++ new/pdns-2.9.21.2/pdns/packethandler.hh 2008-11-16 15:05:06.000000000
+0100
@@ -88,7 +88,6 @@
int findMboxFW(DNSPacket *p, DNSPacket *r, string &target);
int findUrl(DNSPacket *p, DNSPacket *r, string &target);
int doFancyRecords(DNSPacket *p, DNSPacket *r, string &target);
- int doDNSCheckRequest(DNSPacket *p, DNSPacket *r, string &target);
int doVersionRequest(DNSPacket *p, DNSPacket *r, string &target);
bool getAuth(DNSPacket *p, SOAData *sd, const string &target, int *zoneId);
bool getTLDAuth(DNSPacket *p, SOAData *sd, const string &target, int
*zoneId);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/pdns-2.9.21.1/pdns.spec new/pdns-2.9.21.2/pdns.spec
--- old/pdns-2.9.21.1/pdns.spec 2008-08-07 08:48:22.000000000 +0200
+++ new/pdns-2.9.21.2/pdns.spec 2008-11-16 15:05:06.000000000 +0100
@@ -1,6 +1,6 @@
Buildroot: /tmp/pdns
Name: pdns-static
-Version: 2.9.21.1
+Version: 2.9.21.2
Release: 1
Summary: extremely powerful and versatile nameserver
License: GPL

++++++ rcpdns ++++++
--- /var/tmp/diff_new_pack.E31710/_old 2008-12-01 18:04:33.000000000 +0100
+++ /var/tmp/diff_new_pack.E31710/_new 2008-12-01 18:04:33.000000000 +0100
@@ -9,27 +9,27 @@
# 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
+# 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
+# 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.
#
@@ -44,10 +44,10 @@
# 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
+#
+# 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
@@ -65,31 +65,31 @@
# 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
+# * 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
+# $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
+# $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
+# $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
+# 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.
@@ -100,10 +100,10 @@
# It's not used by insserv.
#
# Note on runlevels:
-# 0 - halt/poweroff 6 - reboot
-# 1 - single user 2 - multiuser without network exported
+# 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.
@@ -115,9 +115,9 @@
# 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; }
+test -x $PDNS_SERVER || { echo "$PDNS_SERVER not installed";
+ if [ "$1" = "stop" ]; then exit 0;
+ else exit 5; fi; }


doPC()
@@ -130,7 +130,7 @@


# Source LSB init functions
-# providing start_daemon, killproc, pidofproc,
+# 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,
@@ -155,7 +155,7 @@
rc_reset

# Return values acc. to LSB for all commands but status:
-# 0 - success
+# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
@@ -164,7 +164,7 @@
# 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
@@ -172,92 +172,89 @@

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 --guardian=yes
-
- # Remember status and be verbose
- rc_status -v
- ;;
+ 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
- ;;
+ 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)
- ## Do a restart only if the service was active before.
- ## Note: try-restart is now part of LSB (as of 1.9).
- ## RH has a similar command named condrestart.
- if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than
condrestart ${warn}(RH)${norm}"
- fi
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset # Not running is not a failure.
- fi
- # Remember status and be quiet
- rc_status
- ;;
+ ## Do a restart only if the service was active before.
+ ## Note: try-restart is now part of LSB (as of 1.9).
+ ## RH has a similar command named condrestart.
+ if test "$1" = "condrestart"; then
+ echo "${attn} Use try-restart ${done}(LSB)${attn} rather than
condrestart ${warn}(RH)${norm}"
+ fi
+ $0 status
+ if test $? = 0; then
+ $0 restart
+ else
+ rc_reset # Not running is not a failure.
+ fi
+ # Remember status and be quiet
+ rc_status
+ ;;
restart|force-reload)
- ## Stop the service and regardless of whether it was
- ## running or not, start it again.
- $0 stop
- $0 start
-
- # Remember status and be quiet
- rc_status
- ;;
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ $0 stop
+ $0 start
+
+ # Remember status and be quiet
+ rc_status
+ ;;
reload)
- ## Like force-reload, but if daemon does not support
- ## signaling, do nothing (!)
+ ## Like force-reload, but if daemon does not support
+ ## signaling, do nothing (!)

- echo -n "Reloading PowerDNS authoritative nameserver"
- doPC cycle
- rc_status -v
- ;;
+ echo -n "Reloading PowerDNS authoritative nameserver"
+ doPC cycle
+ rc_status -v
+ ;;
status)
- echo -n "Checking for service PDNS "
- ## Check status with checkproc(8), if process is running
- ## checkproc will return with exit status 0.
-
- # Return value is slightly different for the status command:
- # 0 - service up and running
- # 1 - service dead, but /var/run/ pid file exists
- # 2 - service dead, but /var/lock/ lock file exists
- # 3 - service not running (unused)
- # 4 - service status unknown :-(
- # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
-
- # NOTE: checkproc returns LSB compliant status values.
- checkproc $PDNS_SERVER
- # NOTE: rc_status knows that we called this init script with
- # "status" option and adapts its messages accordingly.
- rc_status -v
- ;;
+ echo -n "Checking for service PDNS "
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Return value is slightly different for the status command:
+ # 0 - service up and running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running (unused)
+ # 4 - service status unknown :-(
+ # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
+
+ # NOTE: checkproc returns LSB compliant status values.
+ checkproc $PDNS_SERVER
+ # NOTE: rc_status knows that we called this init script with
+ # "status" option and adapts its messages accordingly.
+ rc_status -v
+ ;;
probe)
- ## Optional: Probe for the necessity of a reload, print out the
- ## argument to this init script which is required for a reload.
- ## Note: probe is not (yet) part of LSB (as of 1.9)
-
- test /etc/pdns.conf -nt /var/run/pdns.pid && echo reload
- ;;
-
-
- # additional options, taken from the upstream init script
+ ## Optional: Probe for the necessity of a reload, print out the
+ ## argument to this init script which is required for a reload.
+ ## Note: probe is not (yet) part of LSB (as of 1.9)
+
+ test /etc/pdns.conf -nt /var/run/pdns.pid && echo reload
+ ;;
+ # additional options, taken from the upstream init script
force-stop)
echo -n "Stopping PowerDNS authoritative nameserver"
- killall -v -9 pdns_server
- rc_status -v
+ killproc -KILL $PDNS_SERVER
+ rc_status -v
;;
-
monitor)
if test "$NOTRUNNING" = "0"
then
@@ -267,72 +264,66 @@
fi
;;
dump)
- if test "$NOTRUNNING" = "0"
- then
- doPC list
- echo $ret
- else
- echo "not running"
- fi
- ;;
-
+ if test "$NOTRUNNING" = "0"
+ then
+ doPC list
+ echo $ret
+ else
+ echo "not running"
+ fi
+ ;;
show)
- if [ $# -lt 2 ]
- then
- echo Insufficient parameters
- exit
- fi
- if test "$NOTRUNNING" = "0"
- then
- echo -n "$2="
- doPC show $2 ; echo $ret
- else
- echo "not running"
- fi
- ;;
-
+ if [ $# -lt 2 ]
+ then
+ echo Insufficient parameters
+ exit
+ fi
+ if test "$NOTRUNNING" = "0"
+ then
+ echo -n "$2="
+ doPC show $2 ; echo $ret
+ else
+ echo "not running"
+ fi
+ ;;
mrtg)
- if [ $# -lt 2 ]
- then
- echo Insufficient parameters
- exit
- fi
- if test "$NOTRUNNING" = "0"
- then
- doPC show $2 ; echo $ret
- if [ "$3x" != "x" ]
- then
- doPC show $3 ; echo $ret
- else
- echo 0
- fi
- doPC uptime ; echo $ret
- echo PowerDNS daemon
- else
- echo "not running"
- fi
-
- ;;
-
+ if [ $# -lt 2 ]
+ then
+ echo Insufficient parameters
+ exit
+ fi
+ if test "$NOTRUNNING" = "0"
+ then
+ doPC show $2 ; echo $ret
+ if [ "$3x" != "x" ]
+ then
+ doPC show $3 ; echo $ret
+ else
+ echo 0
+ fi
+ doPC uptime ; echo $ret
+ echo PowerDNS daemon
+ else
+ echo "not running"
+ fi
+ ;;
cricket)
- if [ $# -lt 2 ]
- then
- echo Insufficient parameters
- exit
- fi
- if test "$NOTRUNNING" = "0"
- then
- doPC show $2 ; echo $ret
- else
- echo "not running"
- fi
-
- ;;
-
+ if [ $# -lt 2 ]
+ then
+ echo Insufficient parameters
+ exit
+ fi
+ if test "$NOTRUNNING" = "0"
+ then
+ doPC show $2 ; echo $ret
+ else
+ echo "not running"
+ fi

+ ;;
*)
- echo "Usage: $0
{start|stop|status|try-restart|restart|force-reload|reload|probe|force-stop|monitor|dump|show|mrtg|cricket}"
- exit 1
- ;;
+ echo "Usage: $0
{start|stop|status|try-restart|restart|force-reload|reload|probe|force-stop|monitor|dump|show|mrtg|cricket}"
+ exit 1
+ ;;
esac
rc_exit


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages