]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/hyperv/tools/scripts/hv_get_dhcp_info
Revert r272149, which introduces obscure vestiges from the
[FreeBSD/stable/10.git] / contrib / hyperv / tools / scripts / hv_get_dhcp_info
1 #!/bin/sh
2
3 # This is the script retrieves the DHCP state of a given interface.
4 # The kvp daemon code invokes this external script to gather
5 # DHCP setting for the specific interface.
6 #
7 # Input: Name of the interface
8 #
9 # Output: The script prints the string "Enabled" to stdout to indicate
10 #       that DHCP is enabled on the interface. If DHCP is not enabled,
11 #       the script prints the string "Disabled" to stdout.
12 #
13
14 . /etc/rc.subr
15 . /etc/network.subr
16
17 load_rc_config netif
18
19 if dhcpif hn0;
20 then
21 echo "Enabled"
22 else
23 echo "Disabled"
24 fi