dhclient (226879) | dhclient (230007) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/dhclient 226879 2011-10-28 06:03:38Z rea $ | 3# $FreeBSD: head/etc/rc.d/dhclient 230007 2012-01-12 06:48:11Z rea $ |
4# 5 6# PROVIDE: dhclient 7# KEYWORD: nojail nostart 8 9. /etc/rc.subr 10. /etc/network.subr 11 --- 5 unchanged lines hidden (view full) --- 17start_precmd="dhclient_prestart" 18stop_precmd="dhclient_pre_check" 19 20# rc_force check can only be done at the run_rc_command 21# time, so we're testing it in the pre* hooks. 22dhclient_pre_check() 23{ 24 if [ -z "${rc_force}" ] && ! dhcpif $ifn; then | 4# 5 6# PROVIDE: dhclient 7# KEYWORD: nojail nostart 8 9. /etc/rc.subr 10. /etc/network.subr 11 --- 5 unchanged lines hidden (view full) --- 17start_precmd="dhclient_prestart" 18stop_precmd="dhclient_pre_check" 19 20# rc_force check can only be done at the run_rc_command 21# time, so we're testing it in the pre* hooks. 22dhclient_pre_check() 23{ 24 if [ -z "${rc_force}" ] && ! dhcpif $ifn; then |
25 err 1 "'$ifn' is not a DHCP-enabled interface" | 25 local msg 26 msg="'$ifn' is not a DHCP-enabled interface" 27 if [ -z "${rc_quiet}" ]; then 28 err 1 "$msg" 29 else 30 debug "$msg" 31 exit 1 32 fi |
26 fi 27} 28 29dhclient_prestart() 30{ 31 dhclient_pre_check 32 33 # Interface-specific flags (see rc.subr for $flags setting) --- 24 unchanged lines hidden --- | 33 fi 34} 35 36dhclient_prestart() 37{ 38 dhclient_pre_check 39 40 # Interface-specific flags (see rc.subr for $flags setting) --- 24 unchanged lines hidden --- |