[asterisk-commits] branch 1.2 - r7285 /branches/1.2/contrib/init.d/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 2 15:12:06 CST 2005


Author: tilghman
Date: Fri Dec  2 15:12:05 2005
New Revision: 7285

URL: http://svn.digium.com/view/asterisk?rev=7285&view=rev
Log:
Turn on executable bits for startup scripts, and fix bash var interpolation for Mandrake

Modified:
    branches/1.2/contrib/init.d/rc.debian.asterisk   (props changed)
    branches/1.2/contrib/init.d/rc.gentoo.asterisk   (props changed)
    branches/1.2/contrib/init.d/rc.mandrake.asterisk   (contents, props changed)
    branches/1.2/contrib/init.d/rc.mandrake.zaptel   (props changed)
    branches/1.2/contrib/init.d/rc.redhat.asterisk   (props changed)
    branches/1.2/contrib/init.d/rc.slackware.asterisk   (props changed)

Propchange: branches/1.2/contrib/init.d/rc.debian.asterisk
------------------------------------------------------------------------------
    svn:executable = *

Propchange: branches/1.2/contrib/init.d/rc.gentoo.asterisk
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/1.2/contrib/init.d/rc.mandrake.asterisk
URL: http://svn.digium.com/view/asterisk/branches/1.2/contrib/init.d/rc.mandrake.asterisk?rev=7285&r1=7284&r2=7285&view=diff
==============================================================================
--- branches/1.2/contrib/init.d/rc.mandrake.asterisk (original)
+++ branches/1.2/contrib/init.d/rc.mandrake.asterisk Fri Dec  2 15:12:05 2005
@@ -15,7 +15,12 @@
 NOTIFY=root		# Who to notify about crashes
 DUMPDROP=/tmp
 HOSTNAME=`hostname`
-CONFIGFILE=/etc/sysconfig/`basename $0`
+if [ 0`readlink $0` = "0" ]; then
+	CONFIGFILE=/etc/sysconfig/`basename $0`
+else
+	CONFIG0=`readlink $0`
+	CONFIGFILE=/etc/sysconfig/`basename $CONFIG0`
+fi
 
 # Setup environment
 cd /usr/src
@@ -68,7 +73,7 @@
 #{
 #}
 
-SIGMSG=("Hangup" "Interrupt" "Quit" "Illegal instruction" "Trace trap" "IOT Trap" "Bus Error" "Floating-point exception" "Killed" "User-defined signal 1" "Segmentation violation" "User-defined signal 2" "Broken pipe" "Alarm clock" "Termination" "Stack fault")
+SIGMSG=("None", "Hangup" "Interrupt" "Quit" "Illegal instruction" "Trace trap" "IOT Trap" "Bus Error" "Floating-point exception" "Killed" "User-defined signal 1" "Segmentation violation" "User-defined signal 2" "Broken pipe" "Alarm clock" "Termination" "Stack fault")
 
 run_asterisk()
 {
@@ -90,7 +95,7 @@
 			exit 0
 		elif [ $EXITSTATUS -gt 128 ]; then
 			EXITSIGNAL=$(($EXITSTATUS - 128))
-			EXITMSG=$SIGMSG[$EXITSIGNAL]
+			EXITMSG=${SIGMSG[$EXITSIGNAL]}
 			echo "Asterisk exited on signal $EXITSIGNAL - $EXITMSG."
 			if [ "$NOTIFY" != "" ]; then
 				echo "Asterisk exited on signal $EXITSIGNAL - $EXITMSG.  Might want to take a peek." | \

Propchange: branches/1.2/contrib/init.d/rc.mandrake.asterisk
------------------------------------------------------------------------------
    svn:executable = *

Propchange: branches/1.2/contrib/init.d/rc.mandrake.zaptel
------------------------------------------------------------------------------
    svn:executable = *

Propchange: branches/1.2/contrib/init.d/rc.redhat.asterisk
------------------------------------------------------------------------------
    svn:executable = *

Propchange: branches/1.2/contrib/init.d/rc.slackware.asterisk
------------------------------------------------------------------------------
    svn:executable = *



More information about the asterisk-commits mailing list