[asterisk-bugs] [Asterisk 0018776]: [patch] asterisk -rx 'core show version' returns an ANSI string, which is not evaluated correctly with debian init.d script.

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Feb 10 16:35:50 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18776 
====================================================================== 
Reported By:                alecdavis
Assigned To:                lathama
====================================================================== 
Project:                    Asterisk
Issue ID:                   18776
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2011-02-09 14:25 CST
Last Modified:              2011-02-10 16:35 CST
====================================================================== 
Summary:                    [patch] asterisk -rx 'core show version' returns an
ANSI string, which is not evaluated correctly with debian init.d script.
Description: 
this fails and tries to restart asterisk, although it's already
running.<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.
        VERSION=`${DAEMON} -rx 'core show version' || ${TRUE}`
        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          0018780 asterisk -rx 'core show version' return...
====================================================================== 

---------------------------------------------------------------------- 
 (0131834) svnbot (reporter) - 2011-02-10 16:35
 https://issues.asterisk.org/view.php?id=18776#c131834 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 307535

_U  branches/1.6.2/
U   branches/1.6.2/contrib/init.d/rc.debian.asterisk
U   branches/1.6.2/main/asterisk.c

------------------------------------------------------------------------
r307535 | qwell | 2011-02-10 16:35:49 -0600 (Thu, 10 Feb 2011) | 15 lines

Merged revisions 307534 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r307534 | qwell | 2011-02-10 16:33:09 -0600 (Thu, 10 Feb 2011) | 8 lines
  
  Remove color when executing commands via a remote console.
  
  Essentially this makes '-x' imply '-n' on rasterisk.  This was done in a
  different and incomplete way previously, which I'm reverting here.
  
  (issue https://issues.asterisk.org/view.php?id=18776)
  Reported by: alecdavis
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=307535 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-10 16:35 svnbot         Checkin                                      
2011-02-10 16:35 svnbot         Note Added: 0131834                          
======================================================================




More information about the asterisk-bugs mailing list