From ba552f5a3f2b2b476ae7cf4e43d482c2c8c7f8be Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 13 Dec 2021 14:29:46 +0100 Subject: Silencing downloading of tsig in dehydrated-tools. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-dehydrated-tools.postinst | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst index c571adb..698016b 100755 --- a/debian/open-infrastructure-dehydrated-tools.postinst +++ b/debian/open-infrastructure-dehydrated-tools.postinst @@ -236,22 +236,32 @@ EOF case "${TSIG}" in http*) # tsig is a URL - if command -v wget "${TSIG}" -O /dev/null > /dev/null 2>&1 + echo -n "Downloading tsig.key from '${TSIG}'..." + + if command -v wget -q "${TSIG}" -O /dev/null > /dev/null 2>&1 then rm -f /etc/dehydrated/tsig.key - wget "${TSIG}" -O /etc/dehydrated/tsig.key + wget -q "${TSIG}" -O /etc/dehydrated/tsig.key chmod 0600 /etc/dehydrated/tsig.key TSIG_FILE="/etc/dehydrated/tsig.key" - elif command -v curl "${TSIG}" -o /dev/null > /dev/null 2>&1 + elif command -v curl -s "${TSIG}" -o /dev/null > /dev/null 2>&1 then rm -f /etc/dehydrated/tsig.key - curl "${TSIG}" -o /etc/dehydrated/tsig.key + curl -s "${TSIG}" -o /etc/dehydrated/tsig.key chmod 0600 /etc/dehydrated/tsig.key TSIG_FILE="/etc/dehydrated/tsig.key" + else + echo + echo "W: need wget or curl" >&2 + fi + + if [ -n "${TSIG_FILE}" ] + then + echo " done." fi ;; -- cgit v1.2.3