xpp: waitfor_xpds: expansion error with no ABs
authorOron Peled <oron.peled@xorcom.com>
Tue, 28 Oct 2014 15:53:29 +0000 (11:53 -0400)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 6 Nov 2014 11:29:19 +0000 (13:29 +0200)
Fix an exansion error in case there were no Astribanks on the system.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

xpp/waitfor_xpds

index 79e2806..8a46a1d 100755 (executable)
@@ -52,7 +52,7 @@ ab_serial_nums() {
 }
 
 detected_serial_nums() {
-       for i in /sys/bus/astribanks/devices/*/transport; do
+       for i in `ls -1d /sys/bus/astribanks/devices/*/transport 2>/dev/null`; do
                s=`cat "$i/serial" 2>/dev/null` || :
                if [ "$s" = '' ]; then
                        echo "NO-SERIAL"