#!/bin/sh # PROVIDE: dhclient # KEYWORD: nojail nostart # . /etc/rc.subr . /etc/network.subr name="dhcpcd" ifn="$2" command="%%PREFIX%%/sbin/dhcpcd" command_args="$ifn" pidfile="/var/run/dhcpcd-$ifn.pid" start_precmd="dhcpcd_precmd" dhcpcd_precmd() { # Override for $ifn specific flags (see rc.subr for $flags setting) specific=`get_if_var $ifn dhcpcd_flags_IF` if [ -z "$flags" -a -n "$specific" ]; then rc_flags=$specific fi # dhcpcd may need local binaries export PATH=${PATH}:%%PREFIX%%/sbin } load_rc_config $name load_rc_config network if ! dhcpif $ifn; then return 1 fi run_rc_command "$1"