moves the vendor db

This commit is contained in:
Holger Cremer
2019-11-29 22:59:27 +01:00
parent 973d9fcacb
commit acf1c71198
4 changed files with 8 additions and 5 deletions

5
.gitignore vendored
View File

@@ -4,4 +4,7 @@ config.toml
vendor/ vendor/
userDb.json userDb.json
masterDb.json masterDb.json
extras/*.csv extras/*.csv
macVendorDb.csv
listUnkown
spaceDevices

View File

@@ -48,7 +48,7 @@ func main() {
} }
func loadMacDb() map[string]string { func loadMacDb() map[string]string {
file, err := os.Open("extras/macDb.csv") file, err := os.Open("macVendorDb.csv")
check(err) check(err)
defer file.Close() defer file.Close()

4
do.sh
View File

@@ -17,10 +17,10 @@ while (( "$#" )); do
env GOOS=linux GOARCH=amd64 go build cmd/unkownDevices/listUnkown.go env GOOS=linux GOARCH=amd64 go build cmd/unkownDevices/listUnkown.go
;; ;;
test-sync) test-sync)
rsync -n -avzi --delete spaceDevices listUnkown webUI extras/macDb.csv root@spacegate:/home/status/spaceDevices2/ rsync -n -avzi --delete spaceDevices listUnkown webUI macVendorDb.csv root@spacegate:/home/status/spaceDevices2/
;; ;;
sync) sync)
rsync -avzi --delete spaceDevices listUnkown webUI extras/macDb.csv root@spacegate:/home/status/spaceDevices2/ rsync -avzi --delete spaceDevices listUnkown webUI macVendorDb.csv root@spacegate:/home/status/spaceDevices2/
;; ;;
*) *)
usage usage

View File

@@ -2,4 +2,4 @@
1. Download the "MAC Address Block Large" (oui.csv) from here 1. Download the "MAC Address Block Large" (oui.csv) from here
https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries
2. Convert: `./convertOui.py > macDb.csv` 2. Convert: `./convertOui.py > ../macVendorDb.csv`