mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 07:45:20 +00:00
Use -f instead of -x to look for hooks.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user