diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-02 21:12:05 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-02 21:12:05 +0000 |
commit | 7aad9e8d84e40bee78def7d235394355535f9417 (patch) | |
tree | c38eaff7a8eb424db37e89d773d15a9547b5ee34 /contrib/init.d/rc.mandrake.asterisk | |
parent | 24938e5cf9042d944715d041de1636a97bb86c3f (diff) |
Turn on executable bits for startup scripts, and fix bash var interpolation for Mandrake
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7285 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib/init.d/rc.mandrake.asterisk')
-rwxr-xr-x[-rw-r--r--] | contrib/init.d/rc.mandrake.asterisk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/init.d/rc.mandrake.asterisk b/contrib/init.d/rc.mandrake.asterisk index 5452fdda7..702de53dc 100644..100755 --- a/contrib/init.d/rc.mandrake.asterisk +++ b/contrib/init.d/rc.mandrake.asterisk @@ -15,7 +15,12 @@ CONSOLE=yes # Whether or not you want a console 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 @@ ulimit -c unlimited #{ #} -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 @@ run_asterisk() 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." | \ |