]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Test exit status of which, not just stdout.
authorRoy Marples <roy@marples.name>
Sun, 1 May 2016 14:39:45 +0000 (14:39 +0000)
committerRoy Marples <roy@marples.name>
Sun, 1 May 2016 14:39:45 +0000 (14:39 +0000)
configure

index e6603ff4872c2fe35bf48a99a5a179ce07a8ffbe..fc7b76c259e60c608b7ceb07c036901096963d11 100755 (executable)
--- 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