mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Add support for /etc/dhclient-enter-hooks to match /etc/dhclient-exit-hooks.
This commit is contained in:
parent
1c245ae7d1
commit
d5fedb6e96
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147218
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user