From 4d81c79c9726bb8820fa8c8c2ce3ff452e2e3e5b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 6 Sep 2022 15:53:36 +0200 Subject: Updating dig alternative handling similar to nsupdate for consistency. Signed-off-by: Daniel Baumann --- dehydrated/bin/dehydrated-nsupdate | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'dehydrated/bin') diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate index ea86daa..c6bf6c5 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 -- cgit v1.2.3