You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Ben Mathews (JIRA)" <ji...@apache.org> on 2012/07/17 22:48:35 UTC

[jira] [Closed] (AMQ-3936) activemq status return codes should be LSB compliant

     [ https://issues.apache.org/jira/browse/AMQ-3936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben Mathews closed AMQ-3936.
----------------------------

    
> activemq status return codes should be LSB compliant 
> -----------------------------------------------------
>
>                 Key: AMQ-3936
>                 URL: https://issues.apache.org/jira/browse/AMQ-3936
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>         Environment: [root@esb1 ~]# uname -a
> Linux esb1 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
> [root@esb1 ~]# cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 6.0 (Santiago)
> Active MQ was installed with an rpm built using https://github.com/shdwjk/apache-activemq
>            Reporter: Ben Mathews
>             Fix For: 5.7.0
>
>
> The activemq status command should return error codes matching the status. (See http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html) 
> The file I tested in the download is apache-activemq-5.6.0/bin/linux-x86-64/activemq. There is code in it that appears to return 1 on a stopped state
> status() {
>     getpid
>     if [ "X$pid" = "X" ]
>     then
>         echo "$APP_LONG_NAME is not running."
>         exit 1
>     else
>         echo "$APP_LONG_NAME is running ($pid)."
>         exit 0
>     fi
> }
> However, a 0 is always returned. Running with a -x shows that some other commands are getting run which results in a 0 return value.
> + IDEXE=/usr/bin/id
> + '[' '!' -x /usr/bin/id ']'
> ++ /usr/bin/id -u -n
> + '[' root = activemq ']'
> + '[' Xactivemq '!=' X ']'
> + '[' Xwrapper.lockfile=/var/lock/subsys/ActiveMQ '!=' X ']'
> + '[' X '!=' X ']'
> + su -m activemq -c '/etc/rc.d/init.d/activemq status'
> ActiveMQ Broker is not running.
> + '[' Xwrapper.lockfile=/var/lock/subsys/ActiveMQ '!=' X ']'
> + getpid
> + '[' -f /var/run/activemq//ActiveMQ.pid ']'
> + '[' X = X ']'
> + '[' -f /var/lock/subsys/ActiveMQ ']'
> + exit 0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira