From: Ted Lemon Date: Fri, 20 Apr 2001 20:01:19 +0000 (+0000) Subject: Use -f instead of -x to look for hooks. X-Git-Tag: V3-RC2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06fa897b5ec4d7b1836d0c747d9883851b570617;p=thirdparty%2Fdhcp.git Use -f instead of -x to look for hooks. --- diff --git a/client/scripts/bsdos b/client/scripts/bsdos index 1f6dede8d..13be70085 100755 --- a/client/scripts/bsdos +++ b/client/scripts/bsdos @@ -10,7 +10,7 @@ make_resolv_conf() { # Must be used on exit. Invokes the local dhcp client exit hooks, if any. exit_with_hooks() { exit_status=$1 - if [ -x /etc/dhclient-exit-hooks ]; then + if [ -f /etc/dhclient-exit-hooks ]; then . /etc/dhclient-exit-hooks fi # probably should do something with exit status of the local script @@ -18,7 +18,7 @@ exit_with_hooks() { } # Invoke the local dhcp client enter hooks, if they exist. -if [ -x /etc/dhclient-enter-hooks ]; then +if [ -f /etc/dhclient-enter-hooks ]; then exit_status=0 . /etc/dhclient-enter-hooks # allow the local script to abort processing of this state diff --git a/client/scripts/freebsd b/client/scripts/freebsd index b9d7a36c5..4f2d971fa 100755 --- a/client/scripts/freebsd +++ b/client/scripts/freebsd @@ -16,7 +16,7 @@ make_resolv_conf() { # Must be used on exit. Invokes the local dhcp client exit hooks, if any. exit_with_hooks() { exit_status=$1 - if [ -x /etc/dhclient-exit-hooks ]; then + if [ -f /etc/dhclient-exit-hooks ]; then . /etc/dhclient-exit-hooks fi # probably should do something with exit status of the local script @@ -24,7 +24,7 @@ exit_with_hooks() { } # Invoke the local dhcp client enter hooks, if they exist. -if [ -x /etc/dhclient-enter-hooks ]; then +if [ -f /etc/dhclient-enter-hooks ]; then exit_status=0 . /etc/dhclient-enter-hooks # allow the local script to abort processing of this state diff --git a/client/scripts/linux b/client/scripts/linux index 620efd512..9f02f23f3 100755 --- a/client/scripts/linux +++ b/client/scripts/linux @@ -32,7 +32,7 @@ function make_resolv_conf() { # Must be used on exit. Invokes the local dhcp client exit hooks, if any. function exit_with_hooks() { exit_status=$1 - if [ -x /etc/dhclient-exit-hooks ]; then + if [ -f /etc/dhclient-exit-hooks ]; then . /etc/dhclient-exit-hooks fi # probably should do something with exit status of the local script @@ -40,7 +40,7 @@ function exit_with_hooks() { } # Invoke the local dhcp client enter hooks, if they exist. -if [ -x /etc/dhclient-enter-hooks ]; then +if [ -f /etc/dhclient-enter-hooks ]; then exit_status=0 . /etc/dhclient-enter-hooks # allow the local script to abort processing of this state diff --git a/client/scripts/netbsd b/client/scripts/netbsd index 404b7ac3c..f61d0e788 100755 --- a/client/scripts/netbsd +++ b/client/scripts/netbsd @@ -10,7 +10,7 @@ make_resolv_conf() { # Must be used on exit. Invokes the local dhcp client exit hooks, if any. exit_with_hooks() { exit_status=$1 - if [ -x /etc/dhclient-exit-hooks ]; then + if [ -f /etc/dhclient-exit-hooks ]; then . /etc/dhclient-exit-hooks fi # probably should do something with exit status of the local script @@ -18,7 +18,7 @@ exit_with_hooks() { } # Invoke the local dhcp client enter hooks, if they exist. -if [ -x /etc/dhclient-enter-hooks ]; then +if [ -f /etc/dhclient-enter-hooks ]; then exit_status=0 . /etc/dhclient-enter-hooks # allow the local script to abort processing of this state diff --git a/client/scripts/openbsd b/client/scripts/openbsd index 1f6dede8d..13be70085 100644 --- a/client/scripts/openbsd +++ b/client/scripts/openbsd @@ -10,7 +10,7 @@ make_resolv_conf() { # Must be used on exit. Invokes the local dhcp client exit hooks, if any. exit_with_hooks() { exit_status=$1 - if [ -x /etc/dhclient-exit-hooks ]; then + if [ -f /etc/dhclient-exit-hooks ]; then . /etc/dhclient-exit-hooks fi # probably should do something with exit status of the local script @@ -18,7 +18,7 @@ exit_with_hooks() { } # Invoke the local dhcp client enter hooks, if they exist. -if [ -x /etc/dhclient-enter-hooks ]; then +if [ -f /etc/dhclient-enter-hooks ]; then exit_status=0 . /etc/dhclient-enter-hooks # allow the local script to abort processing of this state diff --git a/client/scripts/solaris b/client/scripts/solaris index 7ad7eaf89..21e83fa03 100755 --- a/client/scripts/solaris +++ b/client/scripts/solaris @@ -10,7 +10,7 @@ make_resolv_conf() { # Must be used on exit. Invokes the local dhcp client exit hooks, if any. exit_with_hooks() { exit_status=$1 - if [ -x /etc/dhclient-exit-hooks ]; then + if [ -f /etc/dhclient-exit-hooks ]; then . /etc/dhclient-exit-hooks fi # probably should do something with exit status of the local script @@ -18,7 +18,7 @@ exit_with_hooks() { } # Invoke the local dhcp client enter hooks, if they exist. -if [ -x /etc/dhclient-enter-hooks ]; then +if [ -f /etc/dhclient-enter-hooks ]; then exit_status=0 . /etc/dhclient-enter-hooks # allow the local script to abort processing of this state