From 2af9fbfa88722412d1bb480bf70dd9a77d1932fa Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 21 Aug 2017 05:55:25 +0100 Subject: [PATCH] scripts: scripts-library.sh: Hide 'which' command output If systemd-resolve is not available, then we get the following error in the output which: no systemd-resolve in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/bin) We only care about the 'which' exit code so lets just hide stdout/stderr. Change-Id: Ia6597e68d8237f6d5ab2acb86116dbaa31465e12 --- scripts/scripts-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 34c9a95f82..ffa4603482 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -166,7 +166,7 @@ function get_repos_info { function get_instance_info { TS="$(date +"%H-%M-%S")" (cat /etc/resolv.conf && \ - which systemd-resolve && \ + which systemd-resolve &> /dev/null && \ systemd-resolve --statistics && \ cat /etc/systemd/resolved.conf) > \ "/openstack/log/instance-info/host_dns_info_${TS}.log" || true