[dahdi-commits] sruffell: tools/trunk r6708 - /tools/trunk/dahdi.init
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Jun 23 18:45:21 CDT 2009
Author: sruffell
Date: Tue Jun 23 18:45:16 2009
New Revision: 6708
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6708
Log:
dahdi.init: Define a default span configuration for digital cards.
If there is a digital card in the system, and there is not a span
configuration line in /etc/dahdi/system.conf, the init script will now create
a temporary default one to use. On some installations, this will allow
asterisk to start before dahdi is fully configured.
This a temporary measure until DAHDI is always able to provide a timing
source.
(related to issue #13205)
Modified:
tools/trunk/dahdi.init
Modified: tools/trunk/dahdi.init
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/dahdi.init?view=diff&rev=6708&r1=6707&r2=6708
==============================================================================
--- tools/trunk/dahdi.init (original)
+++ tools/trunk/dahdi.init Tue Jun 23 18:45:16 2009
@@ -200,6 +200,16 @@
modprobe dahdi_dummy 2> /dev/null
fi
+ conf_file=/etc/dahdi/system.conf
+ temp_conf_file=""
+ if [ `dahdi_scan | grep "^type=" | sed -n 1p | grep "^type=digital"` ]; then
+ if [ "`cat $conf_file | grep "^span=1"`" = "" ]; then
+ temp_conf_file=`mktemp /tmp/tmp.dahdi_system_conf.XXX`
+ echo "span=1,1,0,esf,b8zs" > $temp_conf_file
+ DAHDI_CFG_CMD="$DAHDI_CFG -c $temp_conf_file"
+ fi
+ fi
+
if [ $system = debian ]; then
echo -n "Running dahdi_cfg: "
$DAHDI_CFG_CMD 2> /dev/null && echo -n "done"
@@ -208,6 +218,10 @@
action "Running dahdi_cfg: " $DAHDI_CFG_CMD
fi
RETVAL=$?
+
+ if [ -f $temp_conf_file ]; then
+ rm $temp_conf_file;
+ fi
if [ "$LOCKFILE" != '' ]; then
[ $RETVAL -eq 0 ] && touch $LOCKFILE
More information about the dahdi-commits
mailing list