From: Ward Vandewege Date: Thu, 28 Apr 2022 14:43:02 +0000 (-0400) Subject: Do not pipe into `grep -q`, because that stops reading as soon as a X-Git-Tag: 2.5.0~187^2~3 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/0b4945244d55214b331adabce38e33800b55b3e1 Do not pipe into `grep -q`, because that stops reading as soon as a match is found, which can cause a SIGPIPE. No issue # Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index ad01c691b9..c9e535fad2 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -274,7 +274,7 @@ if [ ! -z "${HOSTNAME_EXT}" ] ; then # Make sure that the value configured as IP_INT is a real IP on the system. # If we don't error out early here when there is a mismatch, the formula will # fail with hard to interpret nginx errors later on. - ip addr list |grep -q "${IP_INT}/" + ip addr list |grep "${IP_INT}/" >/dev/null if [[ $? -ne 0 ]]; then echo "Unable to find the IP_INT address '${IP_INT}' on the system, please correct the value in local.params. Exiting..." exit 1