2 # collate and present sysfs information about AoE storage
4 # A more complete version of this script is aoe-stat, in the
8 format
="%8s\t%8s\t%8s\n"
10 sysd
=${sysfs_dir:-/sys}
12 # printf "$format" device mac netif state
14 # Suse 9.1 Pro doesn't put /sys in /etc/mtab
15 #test -z "`mount | grep sysfs`" && {
16 test ! -d "$sysd/block" && {
17 echo "$me Error: sysfs is not mounted" 1>&2
21 for d
in `ls -d $sysd/block/etherd* 2>/dev/null | grep -v p` end
; do
22 # maybe ls comes up empty, so we use "end"
23 test $d = end
&& continue
25 dev
=`echo "$d" | sed 's/.*!//'`
28 "`cat \"$d/netif\"`" \