0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-12 05:48:07 +00:00
packages/utils/bluelog/patches/100-gen-oui-fix-tempfile-use-mirror.patch
Jo-Philipp Wich 641062ccfc bluelog: fix oui.txt processing
- Use a temporary file path within the package build directory to avoid
   cluttering the host systems `/tmp` directory.

 - Switch to a gzipped, snapshotted copy of the `oui.txt` file since the
   upstream IEEE server is extremely slow, also fetching an unversioned HTTP
   resource during compilation breaks reproducable builds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
[rework to use standard download facility]
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-07-03 12:55:43 +00:00

32 lines
590 B
Diff

--- a/gen_oui.sh
+++ b/gen_oui.sh
@@ -3,7 +3,7 @@
VER="1.2"
# Location of tmp file
-TMPFILE="/tmp/oui.tmp"
+TMPFILE="./oui.tmp"
# File to write
OUIFILE="oui.txt"
@@ -22,10 +22,7 @@ exit 1
get_oui ()
{
-echo -n "Downloading OUI file from IEEE..."
-wget --quiet -O $TMPFILE http://standards.ieee.org/develop/regauth/oui/oui.txt || \
- ErrorMsg ERR "Unable to contact IEEE server!"
-
+[ -f "$TMPFILE" ] || ErrorMsg ERR "Unable to find $TMPFILE"
echo "OK"
}
@@ -44,7 +41,6 @@ echo "OK"
clean_all ()
{
echo -n "Removing files..."
-rm -f $TMPFILE
rm -f $OUIFILE
echo "OK"
}