[Bug 248947] [NEW] asterisk init script is not LSB compliant (for heartbeat, i.e. linux-ha)

Launchpad Bug Tracker 248947 at bugs.launchpad.net
Mon Sep 29 15:30:45 BST 2008


You have been subscribed to a public bug by Thierry Carrez (tcarrez):

Binary package hint: asterisk

Description: Ubuntu 8.04
Release: 8.04
Package: asterisk
Version: 1:1.4.17~dfsg-2ubuntu1

In order to use asterisk in a heartbeat setup, I need the init script to
report the status of the service according to the LSB standard [1]. The
script has to exit with a status of 3 if the service is stopped and 0 if
it is running. But the asterisk init script returns 1 if asterisk is
stopped and 0 if it is running. The fix is quite easy:

--- /etc/init.d/asterisk.orig   2008-04-12 07:03:24.000000000 +0000
+++ /etc/init.d/asterisk        2008-07-16 09:05:27.000000000 +0000
@@ -126,7 +126,7 @@
        plist=`ps ax | awk "{ if (\\$5 == \"$DAEMON\") print \\$1 }"`
        if [ "$plist" = "" ]; then
                echo "$DESC is stopped"
-               return 1
+               return 3
        else
                echo "$DESC is running: $plist"
                return 0

[1] http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-
Core-generic/iniscrptact.html

** Affects: asterisk (Ubuntu)
     Importance: Low
         Status: Confirmed

-- 
asterisk init script is not LSB compliant (for heartbeat, i.e. linux-ha)
https://bugs.launchpad.net/bugs/248947
You received this bug notification because you are a member of Ubuntu Sponsors for universe, which is a direct subscriber.



More information about the Ubuntu-universe-sponsors mailing list