Merge branch 'unbound-local-data' into 'master'
__unbound: add --local_data flag See merge request ungleich-public/cdist-contrib!11
This commit is contained in:
commit
1ff5ad8534
4 changed files with 19 additions and 0 deletions
|
@ -18,6 +18,14 @@ generate_forward_addr() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generate_local_data() {
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
for entry in $LOCAL_DATA; do
|
||||||
|
echo " local-data: \"$entry\""
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
#
|
#
|
||||||
# THIS FILE HAS BEEN GENERATED BY CDIST, DO NOT EDIT BY HAND.
|
# THIS FILE HAS BEEN GENERATED BY CDIST, DO NOT EDIT BY HAND.
|
||||||
|
@ -720,6 +728,7 @@ $(generate_access_control)
|
||||||
# (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
|
# (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
|
||||||
# local-zone: "example.com" redirect
|
# local-zone: "example.com" redirect
|
||||||
# local-data: "example.com A 192.0.2.3"
|
# local-data: "example.com A 192.0.2.3"
|
||||||
|
$(generate_local_data)
|
||||||
#
|
#
|
||||||
# Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
|
# Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
|
||||||
# You can also add PTR records using local-data directly, but then
|
# You can also add PTR records using local-data directly, but then
|
||||||
|
|
|
@ -34,6 +34,10 @@ access_control
|
||||||
rc_interface
|
rc_interface
|
||||||
Address or path to socket used for remote control (see `--enable_control`. Defaults to `127.0.0.1`).
|
Address or path to socket used for remote control (see `--enable_control`. Defaults to `127.0.0.1`).
|
||||||
|
|
||||||
|
local_data
|
||||||
|
Configure local data, which is served in reply to queries for it. Can be
|
||||||
|
specified multiple times.
|
||||||
|
|
||||||
BOOLEAN PARAMETERS
|
BOOLEAN PARAMETERS
|
||||||
------------------
|
------------------
|
||||||
disable-ip4
|
disable-ip4
|
||||||
|
|
|
@ -54,6 +54,11 @@ if [ -f "$__object/parameter/rc_interface" ]; then
|
||||||
export RC_INTERFACE
|
export RC_INTERFACE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$__object/parameter/local_data" ]; then
|
||||||
|
LOCAL_DATA=$(cat "$__object/parameter/local_data")
|
||||||
|
export LOCAL_DATA
|
||||||
|
fi
|
||||||
|
|
||||||
# Boolean parameters:
|
# Boolean parameters:
|
||||||
if [ -f "$__object/parameter/disable_ip4" ] && \
|
if [ -f "$__object/parameter/disable_ip4" ] && \
|
||||||
[ -f "$__object/parameter/disable_ip6" ]; then
|
[ -f "$__object/parameter/disable_ip6" ]; then
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
access_control
|
access_control
|
||||||
|
local_data
|
||||||
interface
|
interface
|
||||||
|
|
Loading…
Reference in a new issue