[asterisk-commits] file: branch 1.4 r196657 - /branches/1.4/contrib/scripts/safe_asterisk

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 26 08:06:15 CDT 2009


Author: file
Date: Tue May 26 08:06:09 2009
New Revision: 196657

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=196657
Log:
Remove some bash specific stuff from safe_asterisk.

(closes issue #10812)
Reported by: paravoid
Patches:
      safe_asterisk_bashism.diff uploaded by tzafrir (license 46)

Modified:
    branches/1.4/contrib/scripts/safe_asterisk

Modified: branches/1.4/contrib/scripts/safe_asterisk
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/contrib/scripts/safe_asterisk?view=diff&rev=196657&r1=196656&r2=196657
==============================================================================
--- branches/1.4/contrib/scripts/safe_asterisk (original)
+++ branches/1.4/contrib/scripts/safe_asterisk Tue May 26 08:06:09 2009
@@ -44,7 +44,7 @@
 	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 @@
 			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 @@
 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 @@
 			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." | \




More information about the asterisk-commits mailing list