Add support for /etc/dhclient-enter-hooks to match /etc/dhclient-exit-hooks.

This commit is contained in:
Brooks Davis 2005-06-10 03:41:18 +00:00
parent 1c245ae7d1
commit d5fedb6e96

View File

@ -186,6 +186,17 @@ exit_with_hooks() {
# Start of active code.
#
# Invoke the local dhcp client enter hooks, if they exist.
if [ -f /etc/dhclient-enter-hooks ]; then
exit_status=0
. /etc/dhclient-enter-hooks
# allow the local script to abort processing of this state
# local script must set exit_status variable to nonzero.
if [ $exit_status -ne 0 ]; then
exit $exit_status
fi
fi
if [ -x $NETSTAT ]; then
if_defaulroute=`$NETSTAT -rn | $GREP "^default" | $AWK '{print $6}'`
else