diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-06-14 09:14:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-06-14 11:59:26 +0000 |
commit | 36bec899cd9190b0965174fc9edcf183f13d6114 (patch) | |
tree | 255473b99ccfa5e5a08b85d2188e5dd6e6d08a6a /dehydrated/bin | |
parent | Adding support for individual TSIG files per record, zone, and nameserver rat... (diff) | |
download | service-tools-36bec899cd9190b0965174fc9edcf183f13d6114.tar.xz service-tools-36bec899cd9190b0965174fc9edcf183f13d6114.zip |
Handling comments in TSIG keyfiles in dehydrated-nsupdate to support disabling TSIG for individual records.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | dehydrated/bin/dehydrated-nsupdate | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate index 5bb253a..05027ab 100755 --- a/dehydrated/bin/dehydrated-nsupdate +++ b/dehydrated/bin/dehydrated-nsupdate @@ -163,7 +163,10 @@ do KEY="" fi - if [ -n "${KEY}" ] + # ignoring comments to allow empty keyfiles to disable TSIG individually + TSIG="$(grep -sv '^#' "${KEY}" || true)" + + if [ -n "${KEY}" ] && [ -n "${TSIG}" ] then NSUPDATE_OPTIONS="-k ${KEY}" fi |