Add README.md and some scripts to get DHCPD hosts into unbound for DNS
This commit is contained in:
parent
68a324be03
commit
c3d133a75e
4 changed files with 141 additions and 0 deletions
unbound
15
unbound/local-data-file-generator
Executable file
15
unbound/local-data-file-generator
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
AWK_SCRIPT=$(cat << 'EOF'
|
||||
/^[ \t]*[^ \t]+[ \t]+([0-9]{1,3}\.){3}[0-9]{1,3}[ \t]*$/ {
|
||||
print "local-data: \"" $1 " A " $2 "\""
|
||||
print "local-data-ptr: \"" $2 " " $1 "\""
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
readonly AWK_SCRIPT
|
||||
|
||||
awk "$AWK_SCRIPT"
|
Loading…
Add table
Add a link
Reference in a new issue