]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If using --with-hooks, don't detect any other hooks. v5.1.2
authorRoy Marples <roy@marples.name>
Fri, 16 Oct 2009 21:36:51 +0000 (21:36 +0000)
committerRoy Marples <roy@marples.name>
Fri, 16 Oct 2009 21:36:51 +0000 (21:36 +0000)
configure

index 82570fe7b6a42d22e58d463bc61e1bcd2beb2f6e..6af723ef34676be112f22e230f59b0ff0303d521 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,8 @@
 #!/bin/sh
 # Try and be like autotools configure, but without autotools
 
+HOOKSET=false
+
 for x; do
        opt=${x%%=*}
        var=${x#*=}
@@ -24,7 +26,7 @@ for x; do
        --with-ccopts|CFLAGS) CFLAGS=$var;;
        CPPFLAGS) CPPFLAGS=$var;;
        --with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";;
-       --with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var;;
+       --with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var; HOOKSET=true;;
        --build) BUILD=$var;;
        --host) HOST=$var;;
        --target) TARGET=$var;;
@@ -285,27 +287,29 @@ fi
 rm -f _strlcpy.c _strlcpy
 
 HOOKS=
-printf "Checking for ntpd ... "
-NTPD=$(_which ntpd)
-if [ -n "$NTPD" ]; then
-       echo "$NTPD (50-ntp.conf)"
-       HOOKS="$HOOKS${HOOKS:+ }50-ntp.conf"
-else
-       echo "not found"
-fi
+if ! $HOOKSET; then
+       printf "Checking for ntpd ... "
+       NTPD=$(_which ntpd)
+       if [ -n "$NTPD" ]; then
+               echo "$NTPD (50-ntp.conf)"
+               HOOKS="$HOOKS${HOOKS:+ }50-ntp.conf"
+       else
+               echo "not found"
+       fi
 
-printf "Checking for ypind ... "
-YPBIND=$(_which ypbind)
-if [ -n "$YPBIND" ]; then
-       if strings "$YPBIND" | grep -q yp.conf; then
-               YPHOOK="50-yp.conf"
+       printf "Checking for ypind ... "
+       YPBIND=$(_which ypbind)
+       if [ -n "$YPBIND" ]; then
+               if strings "$YPBIND" | grep -q yp.conf; then
+                       YPHOOK="50-yp.conf"
+               else
+                       YPHOOK="50-ypbind"
+               fi
+               echo "$YPBIND ($YPHOOK)"
+               HOOKS="$HOOKS${HOOKS:+ }$YPHOOK"
        else
-               YPHOOK="50-ypbind"
+               echo "not found"
        fi
-       echo "$YPBIND ($YPHOOK)"
-       HOOKS="$HOOKS${HOOKS:+ }$YPHOOK"
-else
-       echo "not found"
 fi
 
 cd dhcpcd-hooks