summaryrefslogtreecommitdiff
path: root/xpp
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-07-14 19:59:56 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-07-14 19:59:56 +0000
commitd1a88b92d54c4467356f124ab11c746afb790e50 (patch)
treeb3aa7a2b8c8fd59bebcfd9189d695131fc9b65c6 /xpp
parentd2d161dc71ac1ceec1c9241f9105c12d0e3c43df (diff)
genzaptelconf: use /proc/xpp/XBUS-*/wait_for_xpds rather than a timeout loop
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1227 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp')
-rwxr-xr-xxpp/utils/genzaptelconf17
1 files changed, 2 insertions, 15 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index 1763427..5973c23 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -485,21 +485,8 @@ wait_for_xpp() {
[ "`cat /sys/module/xpp/parameters/zap_autoreg`" = 'Y' ]
then
# wait for the XPDs to register:
- # TODO: replace this loop with 'cat /proc/xpp/XBUS-*/waitfor_xpds
- success=0
- for i in `seq 30`; do
- if ! grep -q 0 /proc/xpp/*/*/zt_registration 2>/dev/null
- then
- # There are either no XPDs or all of them are
- # registered. Nothing to do
- success=1
- break
- fi
- sleep 1
- done
- if [ "$success" = 0 ]; then
- echo 1>&2 "$0: WARNING: some XPD's are not registered yet (timeout)"
- fi
+ # TODO: improve error reporting and produce a messagee here
+ cat /proc/xpp/XBUS-*/wait_for_xpds 2>/dev/null >/dev/null || true
fi
}