e72055b7fe
many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. This is a stable/10 candidate for inclusion with 10.1-RELEASE. Submitted by: Wei Hu <weh microsoft com> MFC after: 1 week
25 lines
527 B
Bash
25 lines
527 B
Bash
#!/bin/sh
|
|
|
|
# This is the script retrieves the DHCP state of a given interface.
|
|
# The kvp daemon code invokes this external script to gather
|
|
# DHCP setting for the specific interface.
|
|
#
|
|
# Input: Name of the interface
|
|
#
|
|
# Output: The script prints the string "Enabled" to stdout to indicate
|
|
# that DHCP is enabled on the interface. If DHCP is not enabled,
|
|
# the script prints the string "Disabled" to stdout.
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
. /etc/network.subr
|
|
|
|
load_rc_config netif
|
|
|
|
if dhcpif hn0;
|
|
then
|
|
echo "Enabled"
|
|
else
|
|
echo "Disabled"
|
|
fi
|