diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-30 16:44:39 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-30 16:44:39 +0000 |
commit | 3fa10b17c85e4faa15c2405dd98d59d71bc3390e (patch) | |
tree | d28799f8677db62b4a7762a058cc69ca4dd8a70d /contrib/init.d/rc.mandrake.asterisk | |
parent | 7c828f4d1ccb3f420b25889377f3620cf1fe0eeb (diff) |
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/branches/1.4@119301 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib/init.d/rc.mandrake.asterisk')
-rwxr-xr-x | contrib/init.d/rc.mandrake.asterisk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/init.d/rc.mandrake.asterisk b/contrib/init.d/rc.mandrake.asterisk index 8d4f0b70d..e9da4a810 100755 --- a/contrib/init.d/rc.mandrake.asterisk +++ b/contrib/init.d/rc.mandrake.asterisk @@ -122,7 +122,7 @@ case "$1" in # 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 |