aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/init.d/rc.redhat.asterisk
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-30 16:47:24 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-30 16:47:24 +0000
commit1a981f03f50ed169339d1d63e77c5a6409e41ca4 (patch)
tree96b4a975e899be1946127ec15daacff15c2f9bf1 /contrib/init.d/rc.redhat.asterisk
parent911e8790c952377b181d50b9c1c47d7d66233bd5 (diff)
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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119302 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib/init.d/rc.redhat.asterisk')
-rwxr-xr-xcontrib/init.d/rc.redhat.asterisk2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk
index de821fe8a..aeaa8f15e 100755
--- a/contrib/init.d/rc.redhat.asterisk
+++ b/contrib/init.d/rc.redhat.asterisk
@@ -71,7 +71,7 @@ start() {
# 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