diff options
| author | Roy Marples <roy@marples.name> | 2020-06-17 15:12:13 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-06-17 15:12:13 +0100 |
| commit | ee73e526cc6129d7f6e8b95db77055e395612c3b (patch) | |
| tree | faf54a11ab65459556ac2f8e060a2c20762e8fed /configure | |
| parent | 9a399ac6e6fea2afc5af0eea54fff810752728ca (diff) | |
| download | dhcpcd-ee73e526cc6129d7f6e8b95db77055e395612c3b.tar.xz | |
configure: add --with-eghook=foo
Allows to force for example ypbind if it's not installed.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 33 |
1 files changed, 19 insertions, 14 deletions
@@ -88,6 +88,8 @@ for x do PKG_CONFIG) PKG_CONFIG=$var;; --with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";; --with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var; HOOKSET=true;; + --with-eghook) EGHOOKSCRIPTS="$EGHOOKSCRIPTS${EGHOOKSCRIPTS+ }$var";; + --with-hooks|EGHOOKSCRIPTS) EGHOOKSCRIPTS=$var; EGHOOKSET=true;; --with-default-hostname) _DEFAULT_HOSTNAME=$var;; --build) BUILD=$var;; --host) HOST=$var; HOSTCC=$var-;; @@ -1712,16 +1714,24 @@ if ! $HOOKSET; then fi fi +find_hook() +{ + for h in [0-9][0-9]"-$x" [0-9][0-9]"-$x.in" \ + [0-9][0-9]"-$x.sh" [0-9][0-9]"-$x.sh.in" \ + [0-9][0-9]"-$x.conf" [0-9][0-9]"-$x.conf.in" + do + [ -e "$h" ] && break + done + [ -e "$h" ] || return 1 + echo "${h%%.in}" + return 0 +} + if cd hooks; then for x in $HOOKSCRIPTS; do printf "Finding hook $x ... " - for h in [0-9][0-9]"-$x" \ - [0-9][0-9]"-$x.sh" \ - [0-9][0-9]"-$x.conf" - do - [ -e "$h" ] && break - done - if [ ! -e "$h" ]; then + h=$(find_hook "$x") + if [ -z "$h" ]; then echo "no" else echo "$h" @@ -1733,13 +1743,8 @@ if cd hooks; then done for x in $EGHOOKSCRIPTS; do printf "Finding example hook $x ... " - for h in [0-9][0-9]"-$x" \ - [0-9][0-9]"-$x.sh" \ - [0-9][0-9]"-$x.conf" - do - [ -e "$h" ] && break - done - if [ ! -e "$h" ]; then + h=$(find_hook "$x") + if [ -z "$h" ]; then echo "no" else echo "$h" |
