7 # KEYWORD: nojail nostart
16 pidfile="/var/run/${name}.${ifn}.pid"
17 start_precmd="dhclient_prestart"
18 stop_precmd="dhclient_pre_check"
20 # rc_force check can only be done at the run_rc_command
21 # time, so we're testing it in the pre* hooks.
24 if [ -z "${rc_force}" ] && ! dhcpif $ifn; then
26 msg="'$ifn' is not a DHCP-enabled interface"
27 if [ -z "${rc_quiet}" ]; then
40 # Interface-specific flags (see rc.subr for $flags setting)
41 specific=$(get_if_var $ifn dhclient_flags_IF)
42 if [ -z "$flags" -a -n "$specific" ]; then
46 background_dhclient=$(get_if_var $ifn background_dhclient_IF $background_dhclient)
47 if checkyesno background_dhclient; then
48 rc_flags="${rc_flags} -b"
51 rc_flags="${rc_flags} ${ifn}"
55 load_rc_config network
58 # only complain if a command was specified but no interface
60 err 1 "$0: no interface specified"