summaryrefslogtreecommitdiff
path: root/generate-openwrt-hosts
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2020-11-10 12:22:24 +0100
committerpks <pks@pks.rocks>2020-11-10 12:22:24 +0100
commit5549f662d63c1d016248e2b86422cae18a628a85 (patch)
tree60e30b96f8693870dd3128c8fced0f891b3b082f /generate-openwrt-hosts
parent20265196280b87e53311ca3c40f9e87fbeee2d89 (diff)
generate-openwrt-hosts
Diffstat (limited to 'generate-openwrt-hosts')
-rwxr-xr-xgenerate-openwrt-hosts9
1 files changed, 9 insertions, 0 deletions
diff --git a/generate-openwrt-hosts b/generate-openwrt-hosts
new file mode 100755
index 0000000..4c9f43a
--- /dev/null
+++ b/generate-openwrt-hosts
@@ -0,0 +1,9 @@
+#!/usr/bin/env zsh
+
+cat hardware.csv | cut -d, -f 1,5 | grep -v TODO | grep -v name | grep -v ipmi | grep -v wired | while read line; do
+ NAME=$(echo $line | cut -d, -f 1)
+ MAC=$(echo $line | cut -d, -f 2)
+ echo "config host"
+ echo "\toption name '$NAME'"
+ echo "\toption mac '$MAC'"
+done