Package: pdns-server Version: 3.1-4.1 Severity: minor Tags: d-i patch Dear Maintainer, I'm trying some tests with pdns in way to replace Bind9. I'm currently working with ldap backend and to check dependency based boot sequence I would like to see pdns start/stop events.
Please have a look on the patched version of pdns init script below, script I'm using. I've only removed '' [ "$VERBOSE" != no ] && '' since $VERBOSE depends on kernel quiet boot. I think a daemon like pdns does not use this kind of variables and should always display LSB log_msg functs. It's a suggest more than a bug, but on some case (like mine), it could be useful. Regards. F!nTcH PS: Even if this bug report is for Version 3.1-4, it comes also in last unstable version (3.3-2). X-Mailer: reportbug 6.4.4 -- System Information: Debian Release: 7.4 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages pdns-server depends on: ii adduser 3.113+nmu3 ii debconf [debconf-2.0] 1.5.49 ii libboost-program-options1.49.0 1.49.0-3.2 ii libboost-serialization1.49.0 1.49.0-3.2 ii libc6 2.13-38+deb7u1 ii libcrypto++9 5.6.1-6 ii libgcc1 1:4.7.2-5 ii liblua5.1-0 5.1.5-4 ii libpolarssl0 1.2.9-1~deb7u1 ii libsqlite3-0 3.7.13-1+deb7u1 ii libstdc++6 4.7.2-5 ii ucf 3.0025+nmu3 ii zlib1g 1:1.2.7.dfsg-13 pdns-server recommends no packages. Versions of packages pdns-server suggests: ii pdns-backend-ldap [pdns-backend] 3.1-4.1 pn pdns-recursor <none> -- Configuration Files: /etc/init.d/pdns changed: PATH=/bin:/sbin:/usr/bin:/usr/sbin BINARYPATH=/usr/bin SBINARYPATH=/usr/sbin SOCKETPATH=/var/run ODESC="PowerDNS Authoritative Name Server" DESC="$ODESC" NAME=pdns DAEMON=/usr/sbin/pdns_server DAEMON_ARGS="" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME [ -x "$DAEMON" ] || exit 0 [ -r /etc/default/pdns ] && . /etc/default/pdns mkdir -p $SOCKETPATH cd $SOCKETPATH suffix=$(basename $0 | cut -d- -f2- -s) if [ $suffix ]; then SUFFIX="--config-name=$suffix" DAEMON_ARGS="$DAEMON_ARGS $SUFFIX" NAME="$NAME-$suffix" DESC="$DESC (config name $suffix)" PIDFILE="/var/run/$NAME-$suffix.pid" fi . /lib/init/vars.sh . /lib/lsb/init-functions doPC() { pdns_control $SUFFIX $1 $2 2> /dev/null return $? } isrunning() { doPC ping > /dev/null return $? } do_start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started if isrunning; then return 1 fi start-stop-daemon --start --quiet \ --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS --daemon --guardian=yes \ || return 2 } do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred doPC quit >/dev/null RETVAL="2" for sec in $(seq 1 5); do if ! isrunning; then RETVAL="0" break fi sleep 1 done [ "$RETVAL" = 2 ] && return 2 rm -f $PIDFILE } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; status) if isrunning; then log_success_msg "$NAME is running: $(doPC status)" else log_failure_msg "$NAME is not running" exit 1 fi ;; force-stop) log_daemon_msg "Killing $ODESC (all instances)" "$NAME" kill -9 $(pidof pdns_server) case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; esac ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; reload|force-reload) log_daemon_msg "Reloading $DESC" "$NAME" if isrunning; then doPC cycle >/dev/null case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; esac else log_end_msg 0 fi ;; monitor) if isrunning; then echo "already running" else pdns_server $DAEMON_ARGS --daemon=no --guardian=no --control-console --loglevel=9 fi ;; dump) if isrunning; then doPC list else echo "not running" fi ;; show) if isrunning; then if [ $# -lt 2 ]; then echo "Insufficient parameters" exit 1 fi echo -n "$2=" doPC show $2 else echo "not running" fi ;; mrtg) if isrunning; then if [ $# -lt 2 ]; then echo "Insufficient parameters" exit 1 fi doPC show $2 if [ "$3x" != "x" ]; then doPC show $3 else echo 0 fi doPC uptime echo "$DESC" else echo "not running" fi ;; cricket) if isrunning; then if [ $# -lt 2 ]; then echo "Insufficient parameters" exit 1 fi doPC show $2 else echo "not running" fi ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|force-stop|restart|reload|monitor|dump|show|mrtg|cricket}" ;; esac exit 0 -- debconf information excluded -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org