From: Roy Marples Date: Sun, 1 May 2016 14:39:45 +0000 (+0000) Subject: Test exit status of which, not just stdout. X-Git-Tag: v6.11.0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=145e88b2b297d77b131b441bd299755426a73003;p=thirdparty%2Fdhcpcd.git Test exit status of which, not just stdout. --- diff --git a/configure b/configure index e6603ff4..fc7b76c2 100755 --- a/configure +++ b/configure @@ -177,7 +177,7 @@ eval DATADIR="$DATADIR" _which() { x="$(which "$1" 2>/dev/null)" - if [ -n "$x" ]; then + if [ $? = 0 -a -n "$x" ]; then echo "$x" return 0 fi