diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-09-06 13:53:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-09-06 13:53:57 +0000 |
commit | 82ca4cbbc07ce3da3287f5a59a68605c7a068bf6 (patch) | |
tree | fbee15fde782812eb52ddebe9ec7511a56f6248c /dehydrated/bin | |
parent | Temporarily passing tsig string to bind as it requires a different keyfile fo... (diff) | |
download | service-tools-82ca4cbbc07ce3da3287f5a59a68605c7a068bf6.tar.xz service-tools-82ca4cbbc07ce3da3287f5a59a68605c7a068bf6.zip |
Updating dig alternative handling similar to nsupdate for consistency.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | dehydrated/bin/dehydrated-nsupdate | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate index f6f40e6..8d2cf7b 100755 --- a/dehydrated/bin/dehydrated-nsupdate +++ b/dehydrated/bin/dehydrated-nsupdate @@ -45,16 +45,26 @@ esac if command -v kdig > /dev/null 2>&1 then # knot-dnsutils - DIG="kdig +noidn" + DIG_VARIANT="knot" elif command -v dig > /dev/null 2>&1 then # bind-dnsutils - DIG="dig +noidnout" + DIG_VARIANT="bind" else echo "'${HOOK}': need dig from bind-dnsutils or knot-dnsutils" >&2 exit 1 fi +case "${DIG_VARIANT}" in + knot) + DIG="kdig +noidn" + ;; + + bind) + DIG="dig +noidnout" + ;; +esac + # alternatives handling for nsupdate if command -v knsupdate > /dev/null 2>&1 then |