/usr/bin/update-oui is in ieee-data 20131224.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #!/bin/sh
# Copyright © 2013 Filippo Giunchedi <filippo@debian.org>
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar.
# See the LICENSE file for more details.
BASEDIR=${BASEDIR:-/usr/share/ieee-data/}
RUN_PARSERS=${RUN_PARSERS:-1}
set -e
ouiurl="http://standards.ieee.org/regauth/oui/oui.txt"
iaburl="http://standards.ieee.org/regauth/oui/iab.txt"
dler=""
[ -x $(which curl) ] && dler="curl"
[ -x $(which lwp-request) ] && dler="lwp-request -m GET"
[ -x $(which wget) ] && dler="wget -q -O-"
if [ -z "$dler" ]; then
echo "Unable to find a suitable downloader, please install wget or curl or libwww-perl"
exit 1
fi
cd $BASEDIR || { echo "can't cd to $BASEDIR"; exit 1; }
echo "Downloading $ouiurl to $BASEDIR/oui.txt"
$dler $ouiurl > oui.txt.new || { echo "$dler $iaburl exit with $?"; exit 1; }
mv oui.txt.new oui.txt
echo "Downloading $iaburl to $BASEDIR/iab.txt"
$dler $iaburl > iab.txt.new || { echo "$dler $iaburl exit with $?"; exit 1; }
mv iab.txt.new iab.txt
if [ -x $(which run-parts) ] && [ -d update.d ] && [ $RUN_PARSERS -ne 0 ]; then
echo "Running parsers from $BASEDIR/update.d"
run-parts -a "$BASEDIR" -a oui.txt update.d/
run-parts -a "$BASEDIR" -a iab.txt update.d/
fi
|