mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-13 05:31:28 -07:00
Remove duplicate file replacement logic in update_vendors.sh
Dang it coderabbit. We expect more of your diffs.
This commit is contained in:
@@ -18,9 +18,6 @@ set -euo pipefail
|
|||||||
TEMP_FILE="/services/run/tmp/ieee-oui.txt.tmp"
|
TEMP_FILE="/services/run/tmp/ieee-oui.txt.tmp"
|
||||||
OUTPUT_FILE="/services/run/tmp/ieee-oui.txt"
|
OUTPUT_FILE="/services/run/tmp/ieee-oui.txt"
|
||||||
|
|
||||||
TEMP_FILE="/services/run/tmp/ieee-oui.txt.tmp"
|
|
||||||
OUTPUT_FILE="/services/run/tmp/ieee-oui.txt"
|
|
||||||
|
|
||||||
# Download the file using wget to stdout and process it
|
# Download the file using wget to stdout and process it
|
||||||
if ! wget --timeout=30 --tries=3 "https://standards-oui.ieee.org/oui/oui.txt" -O /dev/stdout | \
|
if ! wget --timeout=30 --tries=3 "https://standards-oui.ieee.org/oui/oui.txt" -O /dev/stdout | \
|
||||||
sed -E 's/ *\(base 16\)//' | \
|
sed -E 's/ *\(base 16\)//' | \
|
||||||
@@ -45,7 +42,3 @@ fi
|
|||||||
# Atomic replacement
|
# Atomic replacement
|
||||||
mv "${TEMP_FILE}" "${OUTPUT_FILE}"
|
mv "${TEMP_FILE}" "${OUTPUT_FILE}"
|
||||||
echo "Successfully updated IEEE OUI database ($(wc -l < "${OUTPUT_FILE}") entries)"
|
echo "Successfully updated IEEE OUI database ($(wc -l < "${OUTPUT_FILE}") entries)"
|
||||||
# Atomic replacement
|
|
||||||
mv "${TEMP_FILE}" "${OUTPUT_FILE}"
|
|
||||||
echo "Successfully updated IEEE OUI database ($(wc -l < "${OUTPUT_FILE}") entries)"
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user