#!/bin/bash
IFACE=$1
count=0
echo -n "Wait for ${IFACE}"
while ! /sbin/ifconfig ${IFACE} 2>/dev/null | grep -q "UP" ; do
echo -n "."
sleep 1
count=`expr $count + 1`
if [ $count -gt 10 ] ; then
echo "not found in 15sec - bailing"
exit 1
fi
done
echo ". ($count)"
exit 0