firmware/bsp/default/root_file_system/etc/showmacs.sh
Tim Niemeyer b4d756cb91 New build_script structure.
The new build_script uses a bsp-style interface. Now it's possible
to work on more than one board at the same time. Just select the
selected_bsp with the build_script and start over.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2012-09-29 18:58:44 +02:00

16 lines
352 B
Bash
Executable File

#!/bin/sh
#
# SHOWMACS need br-ctl! NO BUSYBOX!
#
# Version 0.2
#
# by Tim Niemeyer (reddog@mastersword.de)
#
DEV=$1
SEDDEV=`brctl showstp $DEV | egrep '\([0-9]\)' | sed -e "s/(//;s/)//" | awk '{ print "s/^ "$2"/"$1"/;" }'`
SEDMAC=`cat /etc/bat-hosts | sed -e "s/^/s\//;s/$/\/;/;s/ /\//"`
brctl showmacs $DEV | sed -e "$SEDMAC" | sed -e "$SEDDEV"