next up previous contents
Next: localantest.sh Up: Scripts di usability Previous: daemons.sh   Indice

pingall.sh

#!/bin/bash

. cluster.conf

HOSTS="$( cat $DHCP | grep host | awk {'print $2'} )"
for i in $HOSTS ; do
  echo -n "$i: "
  ping -c 1 -w 1 $i &> /dev/null
  if [ $? = 0 ] ; then
    echo "Yes"
  else
    echo "No"
  fi
done



Mario Cavicchi 2004-07-22