[zaptel-commits] tzafrir: trunk r2572 - /trunk/zaptel.init
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Tue Jun 5 13:35:15 MST 2007
Author: tzafrir
Date: Tue Jun 5 15:35:14 2007
New Revision: 2572
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2572
Log:
* >& does not work with all /bin/sh shells (specifically not /bin/dash ,
occasionally used as /bin/sh in Debian / Ubuntu).
* Removed some unnecessary 2>/dev/null . If ztcfg failed, the user
should know, and have the data to fix the problem.
* Removing ztcfg -s from the stop target. Who needs it?
Modified:
trunk/zaptel.init
Modified: trunk/zaptel.init
URL: http://svn.digium.com/view/zaptel/trunk/zaptel.init?view=diff&rev=2572&r1=2571&r2=2572
==============================================================================
--- trunk/zaptel.init (original)
+++ trunk/zaptel.init Tue Jun 5 15:35:14 2007
@@ -123,7 +123,7 @@
# the built-in echo of bash fails to print a proper error on failure
if ! /bin/echo "$sync_value" >/proc/xpp/sync
then
- echo >&2 "Updating XPP sync source failed (tried \"$sync_value\", XPP_SYNC='$XPP_SYNC')"
+ echo >2 "Updating XPP sync source failed (tried \"$sync_value\", XPP_SYNC='$XPP_SYNC')"
fi
}
@@ -141,7 +141,7 @@
run_ztcfg() {
if [ $system = debian ]; then
echo -n "Running ztcfg: "
- $ZTCFG_CMD >/dev/null 2>&1 && echo -n "done"
+ $ZTCFG_CMD && echo -n "done"
RETVAL=$?
echo "."
elif [ $system = redhat ]; then
@@ -156,12 +156,12 @@
case "$1" in
start)
# Load drivers
- rmmod wcusb >& /dev/null
- rmmod wcfxsusb >& /dev/null
- rmmod audio >& /dev/null
+ rmmod wcusb 2> /dev/null
+ rmmod wcfxsusb 2> /dev/null
+ rmmod audio 2> /dev/null
if [ $system = debian ]; then
echo -n "Loading zaptel framework: "
- modprobe zaptel ${ARGS} >& /dev/null && echo -n "done"
+ modprobe zaptel ${ARGS} 2> /dev/null && echo -n "done"
echo "."
elif [ $system = redhat ]; then
action "Loading zaptel framework: " modprobe zaptel ${ARGS}
@@ -180,7 +180,7 @@
echo -n "Loading zaptel hardware modules:"
for x in $MODULES; do
eval localARGS="\$${x}_ARGS"
- if modprobe ${x} ${ARGS} ${localARGS} >& /dev/null; then
+ if modprobe ${x} ${ARGS} ${localARGS} 2> /dev/null; then
echo -n " $x"
fi
done
@@ -190,9 +190,9 @@
zap_reg_xpp
fix_asterisbank_sync # can actually be run after ztcfg
- if [ ! -e /proc/zaptel/1 ]; then
- echo "No functioning zap hardware found in /proc/zaptel, loading ztdummy"
- modprobe ztdummy >& /dev/null
+ if head -c 0 /dev/zap/pseudo; then
+ echo "No Zaptel timing source sound. loading ztdummy"
+ modprobe ztdummy
fi
run_ztcfg
@@ -225,7 +225,7 @@
# zaphpec_enable properly installed
if [ $system = debian ]; then
echo -n "Running zaphpec_enable: "
- /usr/sbin/zaphpec_enable >& /dev/null
+ /usr/sbin/zaphpec_enable 2> /dev/null
elif [ $system = redhat ]; then
action "Running zaphpec_enable: " /usr/sbin/zaphpec_enable
fi
@@ -243,7 +243,6 @@
;;
stop)
# Unload drivers
- $ZTCFG -s
echo -n "Unloading zaptel hardware drivers:"
unload_module zaptel
RETVAL=$?
More information about the zaptel-commits
mailing list