[asterisk-bugs] [Asterisk 0018780]: asterisk -rx 'core show version' returns an ANSI string, may not evaluated correctly with various dists init.d scripts

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 9 17:12:30 CST 2011


The following issue has been set as RELATED TO issue 0018776. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18780 
====================================================================== 
Reported By:                alecdavis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18780
Category:                   Core/General
Reproducibility:            have not tried
Severity:                   tweak
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.2.3 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-02-09 17:12 CST
Last Modified:              2011-02-09 17:12 CST
====================================================================== 
Summary:                    asterisk -rx 'core show version' returns an ANSI
string, may not evaluated correctly with various dists init.d scripts
Description: 
this stript fails and tries to restart asterisk, although it's already
running.
Debian has been fixed and tested with
https://issues.asterisk.org/view.php?id=18776.<pre>
 start)
        # Check if Asterisk is already running.  If it is, then bug out,
because
        # starting up Asterisk when Asterisk is already running is very
bad.
        <b>VERSION=`${DAEMON} -rx 'core show version' || ${TRUE}`</b>
        if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
                echo "Asterisk is already running.  $0 will exit now."
                exit 1
        fi
 ...
     # "start-stop-daemon --oknodo" returns 0 even if Asterisk was already
running (as LSB
 expects):
        start-stop-daemon --start --oknodo --exec $DAEMON --
$ASTARGS</pre>
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0018776 [patch] asterisk -rx 'core show version...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-09 17:12 alecdavis      Relationship added       related to 0018776  
======================================================================




More information about the asterisk-bugs mailing list