mirror of https://github.com/postgres/postgres
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
555 B
35 lines
555 B
|
26 years ago
|
#! /bin/sh
|
||
|
|
# Utility to create manufacturer's OUI table
|
||
|
|
|
||
|
|
args=
|
||
|
|
refresh=0
|
||
|
|
|
||
|
|
while [ $# -gt 0 ]
|
||
|
|
do
|
||
|
|
case "$1" in
|
||
|
|
--refresh|--fetch|-r)
|
||
|
|
refresh=1
|
||
|
|
;;
|
||
|
|
--norefresh|--nofetch)
|
||
|
|
refresh=0
|
||
|
|
;;
|
||
|
|
--help)
|
||
|
|
echo "Usage: $0 --[no]refresh dbname"
|
||
|
|
exit
|
||
|
|
;;
|
||
|
|
*)
|
||
|
|
args="$args $1"
|
||
|
|
;;
|
||
|
|
esac
|
||
|
|
shift
|
||
|
|
done
|
||
|
|
|
||
|
|
if [ $refresh -gt 0 ]; then
|
||
|
|
[ -e oui.txt ] && rm -rf oui.txt
|
||
|
|
wget -nd 'http://standards.ieee.org/regauth/oui/oui.txt'
|
||
|
|
fi
|
||
|
|
|
||
|
|
awk -f ouiparse.awk < oui.txt | psql -e $args
|
||
|
|
|
||
|
|
exit
|