2 # collate and present sysfs information about AoE storage
5 format="%8s\t%8s\t%8s\n"
8 # printf "$format" device mac netif state
10 test -z "`mount | grep sysfs`" && {
11 echo "$me Error: sysfs is not mounted" 1>&2
14 test -z "`lsmod | grep '^aoe'`" && {
15 echo "$me Error: aoe module is not loaded" 1>&2
19 for d in `ls -d /sys/block/etherd* 2>/dev/null | grep -v p` end; do
20 # maybe ls comes up empty, so we use "end"
21 test $d = end && continue
23 dev=`echo "$d" | sed 's/.*!//'`
26 "`cat \"$d/netif\"`" \