Package: quagga
Version: 0.99.22.4-1+wheezy1
Severity: important
Tags: patch


I was trying to configure quagga as an LSB resource in a
heartbeat/pacemaker cluster and found that it didn't start reliably.
According to the checklist at
http://clusterlabs.org/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained/ap-lsb.html
the init script has several issues:

 * "/etc/init.d/quagga start" returns a non-zero exit code if quagga is
   already running.
 * "/etc/init.d/quagga status" is not implemented.

This patch resolves those problems (The status message could be a bit
more verbose, though):


--- quagga.init.d.0.99.21-4+wheezy1     2013-11-27 10:12:50.000000000 +0100
+++ quagga.init.d.new   2013-11-27 10:19:54.000000000 +0100
@@ -79,6 +79,7 @@
 
        start-stop-daemon \
                --start \
+                --oknodo \
                --pidfile=`pidfile $1` \
                --exec "$D_PATH/$1" \
                -- \
@@ -282,6 +283,21 @@
        $0 start $2
        ;;
 
+    status)
+       rc=3
+        for i in /var/run/quagga/*.pid 
+        do
+                if [ -f "$i" ]
+               then
+                       d=`basename $i .pid`
+                       running="$running $d"
+                       rc=0
+               fi
+        done
+        echo $running
+       exit $rc
+        ;;
+
     *)
        echo "Usage: /etc/init.d/quagga 
{start|stop|restart|force-reload|<priority>} [daemon]"
        echo "       E.g. '/etc/init.d/quagga 5' would start all daemons with a 
prio 1-5."


-- System Information:
Debian Release: 7.2
  APT prefers stable
  APT policy: (800, 'stable'), (500, 'oldstable')
Architecture: i386 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages quagga depends on:
ii  adduser                    3.113+nmu3    add and remove users and groups
ii  debconf [debconf-2.0]      1.5.49        Debian configuration management sy
ii  iproute                    20120521-3+b3 networking and traffic control too
ii  libc6                      2.13-38       Embedded GNU C Library: Shared lib
ii  libcap2                    1:2.22-1.2    support for getting/setting POSIX.
ii  libpam0g                   1.1.3-7.1     Pluggable Authentication Modules l
ii  libreadline6               6.1-3         GNU readline and history libraries
ii  libtinfo5                  5.9-10        shared low-level terminfo library 
ii  logrotate                  3.8.1-4       Log rotation utility

quagga recommends no packages.

Versions of packages quagga suggests:
ii  snmpd                     5.4.3~dfsg-2.7 SNMP (Simple Network Management Pr

-- Configuration Files:
/etc/quagga/daemons changed [not included]

-- debconf information:
* quagga/really_stop: true


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to