[zaptel-commits] tzafrir: branch 1.4 r2660 - /branches/1.4/zaptel.init

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Thu Jun 21 02:41:29 CDT 2007


Author: tzafrir
Date: Thu Jun 21 02:41:29 2007
New Revision: 2660

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2660
Log:
* Remove ztcfg -s from shutdown.
* Someone with a dynamic span, please test the suggested replacement
  (remmed-out).
* Reduced nesting in wait_for_xpp .

Modified:
    branches/1.4/zaptel.init

Modified: branches/1.4/zaptel.init
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel.init?view=diff&rev=2660&r1=2659&r2=2660
==============================================================================
--- branches/1.4/zaptel.init (original)
+++ branches/1.4/zaptel.init Thu Jun 21 02:41:29 2007
@@ -62,12 +62,11 @@
 
 # Wait for Astribank to initialize registers:
 wait_for_xpp() {
-	if [ -d /proc/xpp ]
-	then
-		# reading from waitfor_xpds only returns when the device
-		# has finished initilizing its regiters and is available.
-		cat /proc/xpp/XBUS-*/waitfor_xpds 2>/dev/null >/dev/null  || true
-	fi
+	if [ ! -d /proc/xpp ]; then return; fi
+
+	# reading from waitfor_xpds only returns when the device
+	# has finished initilizing its regiters and is available.
+	cat /proc/xpp/XBUS-*/waitfor_xpds 2>/dev/null >/dev/null  || true
 }
 
 # Register to zaptel Astribank spans that were not autoomatically registered
@@ -169,6 +168,14 @@
 		echo "  This can be caused if you had already run zaphpec_enable, or if your HPEC license is no longer valid."
 	fi
 }
+
+shutdown_dynamic() {
+	if ! grep -q ' ZTD/' /proc/* 2>/dev/null; then return; fi
+
+	# we should only get here if we have dynamic spans. Right?
+	$ZTCFG -s
+}
+
 # Check that telephony is up.
 [ "${TELEPHONY}" = "yes" ] || exit 0
 
@@ -247,7 +254,7 @@
 	;;
   stop)
 	# Unload drivers
-	$ZTCFG -s
+	#shutdown_dynamic # FIXME: needs test from someone with dynamic spans
 	echo -n "Unloading zaptel hardware drivers:"
   	unload_module zaptel
 	RETVAL=$?




More information about the zaptel-commits mailing list