Changeset View
Changeset View
Standalone View
Standalone View
head/sbin/init/rc.d/dhclient
#!/bin/sh | #!/bin/sh | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# PROVIDE: dhclient | # PROVIDE: dhclient | ||||
# KEYWORD: nojailvnet nostart | # KEYWORD: nojailvnet nostart | ||||
. /etc/rc.subr | . /etc/rc.subr | ||||
. /etc/network.subr | . /etc/network.subr | ||||
ifn="$2" | ifn="$2" | ||||
name="dhclient" | name="dhclient" | ||||
desc="Dynamic Host Configuration Protocol (DHCP) client" | desc="Dynamic Host Configuration Protocol (DHCP) client" | ||||
rcvar= | rcvar= | ||||
pidfile="/var/run/${name}.${ifn}.pid" | pidfile="/var/run/dhclient/${name}.${ifn}.pid" | ||||
start_precmd="dhclient_prestart" | start_precmd="dhclient_prestart" | ||||
stop_precmd="dhclient_pre_check" | stop_precmd="dhclient_pre_check" | ||||
# rc_force check can only be done at the run_rc_command | # rc_force check can only be done at the run_rc_command | ||||
# time, so we're testing it in the pre* hooks. | # time, so we're testing it in the pre* hooks. | ||||
dhclient_pre_check() | dhclient_pre_check() | ||||
{ | { | ||||
if [ -z "${rc_force}" ] && ! dhcpif $ifn; then | if [ -z "${rc_force}" ] && ! dhcpif $ifn; then | ||||
Show All 40 Lines |