[asterisk-bugs] [Asterisk 0012687]: [patch] rc.debian.asterisk ubuntu 8.04 hardy

noreply at bugs.digium.com noreply at bugs.digium.com
Fri May 30 11:51:31 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12687 
====================================================================== 
Reported By:                loloski
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   12687
Category:                   General
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             05-19-2008 21:54 CDT
Last Modified:              05-30-2008 11:51 CDT
====================================================================== 
Summary:                    [patch] rc.debian.asterisk ubuntu 8.04 hardy
Description: 
Good day, today i stumble on hardy as to how asterisk would start, i found
out that this particular section of script

	if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
 		echo "Asterisk is already running.  $0 will exit now."
 		exit 1
 	fi

is not applicable if your are using a #!/bin/sh interpreter instead of
#!/bin/bash, on redhat system or equivalent /bin/sh is a symlink of
/bin/bash


a simple fix for this is to replace #!/bin/sh with #!/bin/bash or please
see attached patch for details 

====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 05-30-08 11:51  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 119303

_U  branches/1.6.0/
U   branches/1.6.0/contrib/init.d/rc.debian.asterisk
U   branches/1.6.0/contrib/init.d/rc.gentoo.asterisk
U   branches/1.6.0/contrib/init.d/rc.mandrake.asterisk
U   branches/1.6.0/contrib/init.d/rc.redhat.asterisk
U   branches/1.6.0/contrib/init.d/rc.slackware.asterisk
U   branches/1.6.0/contrib/init.d/rc.suse.asterisk
U   branches/1.6.0/contrib/scripts/safe_asterisk

------------------------------------------------------------------------
r119303 | mvanbaak | 2008-05-30 11:51:26 -0500 (Fri, 30 May 2008) | 30
lines

Merged revisions 119302 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r119302 | mvanbaak | 2008-05-30 18:47:24 +0200 (Fri, 30 May 2008) | 22
lines

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

........
r119301 | mvanbaak | 2008-05-30 18:44:39 +0200 (Fri, 30 May 2008) | 14
lines

dont use a bashism way to check the $VERSION variable.
The rc/init.d scripts, and safe_asterisk work on normal sh now again.
Tested on:
OpenBSD 4.2 (me)
Debian etch (me)
Ubuntu Hardy (me and loloski)
FC9 (loloski)

(closes issue http://bugs.digium.com/view.php?id=12687)
Reported by: loloski
Patches:
      20080529-12687-safe_asterisk-fixversion.diff.txt uploaded by
mvanbaak (license 7)
	  Tested by: loloski, mvanbaak

........

................

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

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-30-08 11:51  svnbot         Note Added: 0087561                          
======================================================================




More information about the asterisk-bugs mailing list