[svn-commits] tzafrir: branch 1.4 r4660 - /branches/1.4/live_zap

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 23 14:31:55 CDT 2009


Author: tzafrir
Date: Tue Jun 23 14:31:52 2009
New Revision: 4660

URL: http://svn.asterisk.org/svn-view/zaptel?view=rev&rev=4660
Log:
live_zap: adjust to recent changes in Zaptel

* Adjust to changes in Zaptel.
* Detect OSLEC if it happens to be in our tree.
* Don't bomb-out on some legitimate errors.

Modified:
    branches/1.4/live_zap

Modified: branches/1.4/live_zap
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/live_zap?view=diff&rev=4660&r1=4659&r2=4660
==============================================================================
--- branches/1.4/live_zap (original)
+++ branches/1.4/live_zap Tue Jun 23 14:31:52 2009
@@ -20,6 +20,11 @@
 # as Zaptel depends on them.
 REMOVE_MODULES="zaptel"
 
+if [ -r drivers/oslec/oslec.h ]; then
+	MODULES_LOAD="oslec/oslec zaptel"
+	REMOVE_MODULES="zaptel oslec"
+fi
+
 if [ -r $DESTDIR/live.conf ]; then . $DESTDIR/live.conf; fi
 
 # Give priority to our installed binaries:
@@ -41,8 +46,8 @@
 # With the remote mode, I can't rely on files in the source directory.
 zaptel_drivers() {
 	perl -MZaptel::Hardware -e '
-		my $hardware = Zaptel::Hardware->scan;
-		print join(" ", $hardware->drivers);
+		Zaptel::Hardware->scan;
+		print join(" ", Zaptel::Hardware::drivers("dummy") );
 		'
 }
 
@@ -74,10 +79,7 @@
 # installed the zaptel-perl utilities.
 xpp_startup() {
 	# do nothing if there are no astribank devices:
-	if ! grep -q connected /proc/xpp/xbuses 2>/dev/null; then return 0; fi
-
-	echo "Waiting for Astribank devices to initialize:"
-	cat /proc/xpp/XBUS-[0-9]*/waitfor_xpds 2>/dev/null || true
+	$DESTDIR/usr/share/zaptel/waitfor_xpds
 	
 	# overriding locales for the above two, as perl can be noisy
 	# when locales are missing.
@@ -94,7 +96,7 @@
 # returns: the result from 
 unload_module() {
 	module="$1"
-	line=`lsmod 2>/dev/null | grep "^$1 "`
+	line=`lsmod 2>/dev/null | grep "^$1 "` || true
 	if [ "$line" = '' ]; then return; fi # module was not loaded
 
 	set -- $line
@@ -147,7 +149,7 @@
 	rsync -ai "$0" $DESTDIR "$2:/tmp/"
 	;;
 unload)
-	$AST_SCRIPT stop
+	$AST_SCRIPT stop || :
 	for mod in $REMOVE_MODULES; do
 		unload_module $mod
 	done




More information about the svn-commits mailing list