Merged revisions 37458 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 12 Jul 2006 18:39:36 +0000 (18:39 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 12 Jul 2006 18:39:36 +0000 (18:39 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r37458 | tilghman | 2006-07-12 13:29:01 -0500 (Wed, 12 Jul 2006) | 2 lines

Merge fixup for asterisk startup script to zaptel startup script

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37459 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/init.d/rc.mandrake.zaptel

index c5c2600..dc88396 100755 (executable)
 MODULES="usb-uhci zaptel wcfxo wcusb"
 ######################################
 
-[ -f /etc/sysconfig/`basename $0` ] && . /etc/sysconfig/`basename $0`
+# Resolve back to the basename (i.e. zaptel, not S90zaptel)
+if [ 0`readlink $0` = "0" ]; then
+       CONFIGFILE=/etc/sysconfig/`basename $0`
+else
+       CONFIG0=`readlink $0`
+       CONFIGFILE=/etc/sysconfig/`basename $CONFIG0`
+fi
+
+[ -f $CONFIGFILE ] && . $CONFIGFILE
 
 function probe() {
        gprintf "                           $1"