~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to contrib/mac/updateoui

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# Utility to create manufacturer's OUI table
 
3
 
 
4
args=
 
5
refresh=0
 
6
 
 
7
while [ $# -gt 0 ]
 
8
do
 
9
    case "$1" in
 
10
    --refresh|--fetch|-r)
 
11
        refresh=1
 
12
        ;;
 
13
    --norefresh|--nofetch)
 
14
        refresh=0
 
15
        ;;
 
16
    --help)
 
17
        echo "Usage: $0 --[no]refresh dbname"
 
18
        exit
 
19
        ;;
 
20
    *)
 
21
        args="$args $1"
 
22
        ;;
 
23
    esac
 
24
    shift
 
25
done
 
26
 
 
27
if [ $refresh -gt 0 ]; then
 
28
    [ -e oui.txt ] && rm -rf oui.txt
 
29
    wget -nd 'http://standards.ieee.org/regauth/oui/oui.txt'
 
30
fi
 
31
 
 
32
awk -f ouiparse.awk < oui.txt | psql -e $args
 
33
 
 
34
exit