netdiscover/netdiscover-update-oui.patch

100 lines
2.6 KiB
Diff
Raw Normal View History

Index: netdiscover-0.3-pre-beta7/update-oui-database.sh
===================================================================
--- netdiscover-0.3-pre-beta7.orig/update-oui-database.sh
+++ netdiscover-0.3-pre-beta7/update-oui-database.sh
@@ -23,15 +23,15 @@
JA=${0##*/}
DATE=$(date +'%Y%m%d')
ORIGF=oui.txt
-DSTD=src
+#DSTD=src
DSTF=oui.h
URL="http://standards.ieee.org/develop/regauth/oui/oui.txt"
-TMPF=$ORIGF-$DATE
+TMPF=$ORIGF
AWK="gawk"
#AWK="mawk"
#AWK="awk"
-[ -d "$DSTD" ] || { echo "$JA: Destdir \"$DSTD\" not exist!"; exit 1; }
+#[ -d "$DSTD" ] || { echo "$JA: Destdir \"$DSTD\" not exist!"; exit 1; }
#if ! [ -f "$TMPF" -a -s "$TMPF" ]; then
# echo "Trying download \"$ORIGF\" with lynx..."
# if ! lynx -source $URL >"$TMPF"; then
@@ -47,32 +47,32 @@ AWK="gawk"
#else
# echo "\"$TMPF\" already exist, skipping download..."
#fi
-if ! [ -f "$TMPF" -a -s "$TMPF" ]; then
- echo -n "Trying download \"$ORIGF\" with lynx..."
- if [[ -x /usr/bin/lynx ]]; then
- lynx -source $URL >"$TMPF"
- else
- echo -n " with elinks..."
- if [[ -x /usr/bin/elinks ]]; then
- elinks -source $URL >"$TMPF"
- else
- echo " with wget..."
- if [[ -x /usr/bin/wget ]]; then
- wget --quiet --output-document="$TMPF" $URL
- else
- if [[ -x /usr/bin/curl ]]; then
- curl -s $URL >"$TMPF"
- else
- echo "$JA: Can't obtain \"$URL\"!"
- exit 1
- fi
- fi
- fi
- fi
-else
- echo -n "\"$TMPF\" already exist, skipping download..."
-fi
-echo ""
+#if ! [ -f "$TMPF" -a -s "$TMPF" ]; then
+# echo -n "Trying download \"$ORIGF\" with lynx..."
+# if [[ -x /usr/bin/lynx ]]; then
+# lynx -source $URL >"$TMPF"
+# else
+# echo -n " with elinks..."
+# if [[ -x /usr/bin/elinks ]]; then
+# elinks -source $URL >"$TMPF"
+# else
+# echo " with wget..."
+# if [[ -x /usr/bin/wget ]]; then
+# wget --quiet --output-document="$TMPF" $URL
+# else
+# if [[ -x /usr/bin/curl ]]; then
+# curl -s $URL >"$TMPF"
+# else
+# echo "$JA: Can't obtain \"$URL\"!"
+# exit 1
+# fi
+# fi
+# fi
+# fi
+#else
+# echo -n "\"$TMPF\" already exist, skipping download..."
+#fi
+#echo ""
echo "Process oui.txt (\"$TMPF\")..."
@@ -108,7 +108,8 @@ BEGIN {
END {
printf(" { NULL, NULL }\n};\n\n");
printf("// Total %i items.\n\n", NN);
-}' >"$DSTD/$DSTF"
+}' >"$DSTF"
+##}' >"$DSTD/$DSTF"
if [ $? -ne 0 ]; then
@@ -116,5 +117,5 @@ if [ $? -ne 0 ]; then
exit 1
else
echo "All OK"
- ls -oh oui.txt-* src/oui.h
+## ls -oh oui.txt-* src/oui.h
fi