diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-05-25 14:30:20 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-05-25 14:30:20 +0000 |
commit | 17342e0bf5d5cc2fb6425b2affc4ce850657ba1e (patch) | |
tree | 0ff5ac7628cd1bd0be7e96abd98c201ad3e520e2 | |
parent | ed38d8829eb28229ae6cb0e881f1374d55302221 (diff) |
Properly fix usage of waitfor_xpds in non-standard settings.
From xpp rev. 7137.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6655 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-x | xpp/waitfor_xpds | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xpp/waitfor_xpds b/xpp/waitfor_xpds index 71c5187..e794593 100755 --- a/xpp/waitfor_xpds +++ b/xpp/waitfor_xpds @@ -25,6 +25,10 @@ set -e +# For lab testing +mydir=`dirname $0` +PATH="${mydir}:${PATH}" + ab_list() { # Only check /sys info (don't use /proc anymore). ab=`find /sys/bus/astribanks/devices/xbus-*/ -name waitfor_xpds 2> /dev/null || :` @@ -32,7 +36,11 @@ ab_list() { } # Any hardware? -if [ "`dahdi_hardware | grep xpp_usb`" = "" ]; then +if ! dahdi_hardware="`which dahdi_hardware 2>/dev/null`"; then + echo >&2 "$0: Missing $dahdi_hardware" + exit 0 +fi +if [ "`$dahdi_hardware | grep xpp_usb`" = "" ]; then exit 0 fi @@ -42,6 +50,7 @@ tries=10 while [ ! -e "/sys/bus/astribanks/devices/xbus-00" ] do if [ "$tries" -le 0 ]; then + echo 1>&2 "TIMEOUT" exit 1 fi echo -n 1>&2 "." |