[asterisk-commits] mvanbaak: branch 1.6.0 r119303 - in /branches/1.6.0: ./ contrib/init.d/ contr...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 30 11:57:50 CDT 2008
Author: mvanbaak
Date: Fri May 30 11:57:49 2008
New Revision: 119303
URL: http://svn.digium.com/view/asterisk?view=rev&rev=119303
Log:
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 #12687)
Reported by: loloski
Patches:
20080529-12687-safe_asterisk-fixversion.diff.txt uploaded by mvanbaak (license 7)
Tested by: loloski, mvanbaak
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/contrib/init.d/rc.debian.asterisk
branches/1.6.0/contrib/init.d/rc.gentoo.asterisk
branches/1.6.0/contrib/init.d/rc.mandrake.asterisk
branches/1.6.0/contrib/init.d/rc.redhat.asterisk
branches/1.6.0/contrib/init.d/rc.slackware.asterisk
branches/1.6.0/contrib/init.d/rc.suse.asterisk
branches/1.6.0/contrib/scripts/safe_asterisk
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/contrib/init.d/rc.debian.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/init.d/rc.debian.asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/init.d/rc.debian.asterisk (original)
+++ branches/1.6.0/contrib/init.d/rc.debian.asterisk Fri May 30 11:57:49 2008
@@ -55,7 +55,7 @@
# 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 [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
echo "Asterisk is already running. $0 will exit now."
exit 1
fi
Modified: branches/1.6.0/contrib/init.d/rc.gentoo.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/init.d/rc.gentoo.asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/init.d/rc.gentoo.asterisk (original)
+++ branches/1.6.0/contrib/init.d/rc.gentoo.asterisk Fri May 30 11:57:49 2008
@@ -9,7 +9,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
- if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
echo "Asterisk is already running. $0 will exit now."
exit 1
fi
Modified: branches/1.6.0/contrib/init.d/rc.mandrake.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/init.d/rc.mandrake.asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/init.d/rc.mandrake.asterisk (original)
+++ branches/1.6.0/contrib/init.d/rc.mandrake.asterisk Fri May 30 11:57:49 2008
@@ -122,7 +122,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting Asterisk when Asterisk is already running is very bad.
VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
- if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
echo "Asterisk is already running. $0 will exit now."
exit 1
fi
Modified: branches/1.6.0/contrib/init.d/rc.redhat.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/init.d/rc.redhat.asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/init.d/rc.redhat.asterisk (original)
+++ branches/1.6.0/contrib/init.d/rc.redhat.asterisk Fri May 30 11:57:49 2008
@@ -71,7 +71,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
VERSION=`${AST_SBIN}/asterisk -rx 'core show version'`
- if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
echo "Asterisk is already running."
exit 1
fi
Modified: branches/1.6.0/contrib/init.d/rc.slackware.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/init.d/rc.slackware.asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/init.d/rc.slackware.asterisk (original)
+++ branches/1.6.0/contrib/init.d/rc.slackware.asterisk Fri May 30 11:57:49 2008
@@ -13,7 +13,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
VERSION=`/usr/sbin/asterisk -rx 'core show version'`
- if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
echo "Asterisk is already running. $0 will exit now."
exit 1
fi
Modified: branches/1.6.0/contrib/init.d/rc.suse.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/init.d/rc.suse.asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/init.d/rc.suse.asterisk (original)
+++ branches/1.6.0/contrib/init.d/rc.suse.asterisk Fri May 30 11:57:49 2008
@@ -67,7 +67,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting Asterisk when Asterisk is already running is very bad.
VERSION=`/usr/sbin/asterisk -rx 'core show version'`
- if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+ if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
echo "Asterisk is already running. $0 will exit now."
exit 1
fi
Modified: branches/1.6.0/contrib/scripts/safe_asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/contrib/scripts/safe_asterisk?view=diff&rev=119303&r1=119302&r2=119303
==============================================================================
--- branches/1.6.0/contrib/scripts/safe_asterisk (original)
+++ branches/1.6.0/contrib/scripts/safe_asterisk Fri May 30 11:57:49 2008
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# vim:textwidth=80:tabstop=4:shiftwidth=4:smartindent:autoindent
CLIARGS="$*" # Grab any args passed to safe_asterisk
@@ -41,7 +41,7 @@
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
-if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
+if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
message "Asterisk is already running. $0 will exit now."
exit 1
fi
More information about the asterisk-commits
mailing list