diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-26 13:06:09 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-26 13:06:09 +0000 |
commit | e442a1431a8f42fd7a1d7d3fe6772bbe2056aad1 (patch) | |
tree | 5b5d492723e3b9f891fe7ab154e3001c7eb2a76e /contrib | |
parent | f78c6077dd250a86ebe3835aac1fb7c1458b3b5e (diff) |
Remove some bash specific stuff from safe_asterisk.
(closes issue #10812)
Reported by: paravoid
Patches:
safe_asterisk_bashism.diff uploaded by tzafrir (license 46)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@196657 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/scripts/safe_asterisk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk index 3884ef4df..62dea516f 100644 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -44,7 +44,7 @@ then echo "This is NOT suitable for large systems." >&2 PRIORITY=0 else - if `echo $OSTYPE | grep linux 2>&1 > /dev/null ` + if `uname -s | grep Linux 2>&1 > /dev/null ` then # maximum number of open files is set to the system maximum divided by two if # MAXFILES is not set. @@ -57,7 +57,7 @@ else fi fi SYSCTL_MAXFILES="fs.file-max" - elif `echo $OSTYPE | grep darwin 2>&1 > /dev/null ` + elif `uname -s | grep Darwin 2>&1 > /dev/null ` then SYSCTL_MAXFILES="kern.maxfiles" fi @@ -116,7 +116,7 @@ trap '' PIPE if [ -d /etc/asterisk/startup.d ]; then for script in /etc/asterisk/startup.d/*.sh; do if [ -x ${script} ]; then - source ${script} + . ${script} fi done fi @@ -140,7 +140,7 @@ run_asterisk() echo "Asterisk shutdown normally." exit 0 elif [ $EXITSTATUS -gt 128 ]; then - let EXITSIGNAL=EXITSTATUS-128 + EXITSIGNAL=EXITSTATUS-128 echo "Asterisk exited on signal $EXITSIGNAL." if [ "$NOTIFY" != "" ]; then echo "Asterisk on $MACHINE exited on signal $EXITSIGNAL. Might want to take a peek." | \ |