[Pkg-voip-commits] [dahdi-tools] 215/285: xpp/astribank_hook: remove Astribank initialization

tzafrir at debian.org tzafrir at debian.org
Thu Jul 7 19:18:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository dahdi-tools.

commit 44fe560f3be4993339918a71a81fc50e52c2731a
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 28 13:43:48 2014 -0400

    xpp/astribank_hook: remove Astribank initialization
    
    If this is the last seen Astribank
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
---
 xpp/astribank_hook | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xpp/astribank_hook b/xpp/astribank_hook
index 59c79ea..05d1c17 100755
--- a/xpp/astribank_hook
+++ b/xpp/astribank_hook
@@ -172,6 +172,13 @@ old_synchronous_stop() {
 	fi
 }
 
+ab_list() {
+	find /sys/devices -name idVendor 2>/dev/null | \
+		xargs grep -H  'e4e4' 2>/dev/null | \
+		sed -e 's/idVendor.*/idProduct/' | xargs grep -H '11[3456]' | \
+		sed 's,/[^/]*$,,' || :
+}
+
 tws_watchdog_enable() {
 	devdir="/sys$DEVPATH"
 	label=`cat "$devdir/label"`
@@ -197,6 +204,11 @@ case "$ACTION" in
 add)
 	;;
 remove)
+	ab=`ab_list | wc -l`
+	if [ "$ab" -eq 0 ]; then
+		$LOGGER "$prefix: No more Astribanks -- remove astribank_is_starting semaphore"
+		astribank_is_starting -v -r 2>&1 | $LOGGER
+	fi
 	;;
 online)
 	if can_full_async; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git



More information about the Pkg-voip-commits mailing list