summaryrefslogtreecommitdiff
path: root/zaptel.init
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-02 14:32:33 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-02 14:32:33 +0000
commit8b912155278e1be351e9cbea186ceac746c468f9 (patch)
tree3fdd57c04213281a525b49338d7007244f55c882 /zaptel.init
parent8eb3e091b1eda61b8780e37aa44b2fa7fb5f0778 (diff)
When running the optional xpp_startup, run it only when there are
Astribank devices connected. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2673 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.init')
-rw-r--r--zaptel.init4
1 files changed, 2 insertions, 2 deletions
diff --git a/zaptel.init b/zaptel.init
index d31fb79..5ed8794 100644
--- a/zaptel.init
+++ b/zaptel.init
@@ -67,8 +67,8 @@ unload_module() {
# intended to replace all the the three functions below if user has
# installed the zaptel-perl utilities.
xpp_startup() {
- # do nothing if the module xpp was not loaded
- if [ ! -d /proc/xpp ]; then return 0; fi
+ # 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