[zaptel-commits] tilghman: branch 1.2 r1317 -
/branches/1.2/zaptel.init
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Tue Aug 15 18:36:35 MST 2006
Author: tilghman
Date: Tue Aug 15 20:36:34 2006
New Revision: 1317
URL: http://svn.digium.com/view/zaptel?rev=1317&view=rev
Log:
Bug 7624 - Debian lacks /var/lock/subsys
Modified:
branches/1.2/zaptel.init
Modified: branches/1.2/zaptel.init
URL: http://svn.digium.com/view/zaptel/branches/1.2/zaptel.init?rev=1317&r1=1316&r2=1317&view=diff
==============================================================================
--- branches/1.2/zaptel.init (original)
+++ branches/1.2/zaptel.init Tue Aug 15 20:36:34 2006
@@ -26,8 +26,10 @@
# Source zaptel configuration.
if [ $system = debian ]; then
[ -f /etc/default/zaptel ] && . /etc/default/zaptel
+ LOCKFILE=/var/lock/zaptel
elif [ $system = redhat ]; then
[ -f /etc/sysconfig/zaptel ] && . /etc/sysconfig/zaptel
+ LOCKFILE=/var/lock/subsys/zaptel
fi
if [ -z "${MODULES}" ]; then
@@ -57,7 +59,7 @@
# See how we were called.
case "$1" in
start)
- # Load drivers
+ # Load drivers
rmmod wcusb >& /dev/null
rmmod wcfxsusb >& /dev/null
rmmod audio >& /dev/null
@@ -99,11 +101,11 @@
fi
RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zaptel
- ;;
+ [ $RETVAL -eq 0 ] && touch $LOCKFILE
+ ;;
stop)
- # Unload drivers
- echo -n "Unloading zaptel hardware drivers:"
+ # Unload drivers
+ echo -n "Unloading zaptel hardware drivers:"
for x in $RMODULES; do
if rmmod ${x} >& /dev/null; then
echo -n " $x"
@@ -120,9 +122,9 @@
fi
RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zaptel
- ;;
- restart)
+ [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
+ ;;
+ restart)
$0 stop
$0 start
;;
@@ -137,8 +139,8 @@
RETVAL=$?
;;
*)
- echo "Usage: zaptel {start|stop|restart|reload}"
- exit 1
+ echo "Usage: zaptel {start|stop|restart|reload}"
+ exit 1
esac
exit $RETVAL
More information about the zaptel-commits
mailing list