diff options
Diffstat (limited to 'generate-openwrt-hosts')
-rwxr-xr-x | generate-openwrt-hosts | 9 |
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 |