[zaptel-commits] tzafrir: branch tzafrir/zaphelper r1631 - /team/tzafrir/zaphelper/zaptel-helper

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Nov 21 14:15:47 MST 2006


Author: tzafrir
Date: Tue Nov 21 15:15:47 2006
New Revision: 1631

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1631
Log:
zaptel-helper: Add guarantee_timing_source to load ztdummy if there 
is no existing timing source.

Modified:
    team/tzafrir/zaphelper/zaptel-helper

Modified: team/tzafrir/zaphelper/zaptel-helper
URL: http://svn.digium.com/view/zaptel/team/tzafrir/zaphelper/zaptel-helper?view=diff&rev=1631&r1=1630&r2=1631
==============================================================================
--- team/tzafrir/zaphelper/zaptel-helper (original)
+++ team/tzafrir/zaphelper/zaptel-helper Tue Nov 21 15:15:47 2006
@@ -66,6 +66,15 @@
 		error "No /dev/zap/ctl: cannot run ztcfg. Aborting."
 	fi
 }
+	
+# If there is no zaptel timing source, load
+# ztdummy. Other modules should have been loaded by
+# now.
+guarantee_timing_source() {
+	if ! head -c 0 /dev/zap/pseudo 2>/dev/null
+	then modprobe ztdummy || true # will fail if there is no module package
+	fi
+}
 
 # recursively unload a module and its dependencies, if possible.
 # where's modprobe -r when you need it?
@@ -155,12 +164,6 @@
 	fix_asterisbank_sync
 	wait_for_zapctl
 	
-	# If there is no zaptel timing source, load
-	# ztdummy. Other modules should have been loaded by
-	# now.
-	if ! head -c 0 /dev/zap/pseudo 2>/dev/null
-	then modprobe ztdummy || true # will fail if there is no module package
-	fi
         if [ -r /etc/fxotune.conf ] && [ -x $FXOTUNE ]; then
           $FXOTUNE -s
         fi



More information about the zaptel-commits mailing list