22 lines
434 B
Bash
Executable file
22 lines
434 B
Bash
Executable file
#!/bin/bash
|
|
|
|
source scan-netdev
|
|
|
|
for VLAN in {401..408} ; do
|
|
if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then
|
|
VLAN_CONF=`grep $SERVER_SERIAL \
|
|
/etc/netdev/vlan.$VLAN.csv`
|
|
fi
|
|
if [[ -z $VLAN_CONF ]] ; then
|
|
continue
|
|
fi
|
|
IP_LIST=`cat /etc/netdev/vlan.$VLAN.csv \
|
|
| sed 's/#.*$//' \
|
|
| cut -d ',' -f 3 \
|
|
| grep '^[0-9]' | sort`
|
|
for IP in $IP_LIST; do
|
|
echo -n "$IP - "
|
|
ping -c100 -f $IP | grep 'received'
|
|
done
|
|
done
|
|
|