1271493Sdelphij#!/bin/sh 2271493Sdelphij 3271493Sdelphij# This is the script retrieves the DHCP state of a given interface. 4271493Sdelphij# The kvp daemon code invokes this external script to gather 5271493Sdelphij# DHCP setting for the specific interface. 6271493Sdelphij# 7271493Sdelphij# Input: Name of the interface 8271493Sdelphij# 9271493Sdelphij# Output: The script prints the string "Enabled" to stdout to indicate 10271493Sdelphij# that DHCP is enabled on the interface. If DHCP is not enabled, 11271493Sdelphij# the script prints the string "Disabled" to stdout. 12271493Sdelphij# 13271493Sdelphij 14271493Sdelphij. /etc/rc.subr 15271493Sdelphij. /etc/network.subr 16271493Sdelphij 17271493Sdelphijload_rc_config netif 18271493Sdelphij 19271493Sdelphijif dhcpif hn0; 20271493Sdelphijthen 21271493Sdelphijecho "Enabled" 22271493Sdelphijelse 23271493Sdelphijecho "Disabled" 24271493Sdelphijfi 25