View | Details | Raw Unified | Return to bug 247562
Collapse All | Expand All

(-)/etc/rc.d/dhclient (-1 / +10 lines)
Lines 10-24 Link Here
10
. /etc/network.subr
10
. /etc/network.subr
11
11
12
ifn="$2"
12
ifn="$2"
13
13
14
name="dhclient"
14
name="dhclient"
15
desc="Dynamic Host Configuration Protocol (DHCP) client"
15
desc="Dynamic Host Configuration Protocol (DHCP) client"
16
rcvar=
16
rcvar=
17
pidfile="/var/run/dhclient/${name}.${ifn}.pid"
17
piddir=/var/run/dhclient
18
piddir_mode=0750
19
pidfile="$piddir/${name}.${ifn}.pid"
18
start_precmd="dhclient_prestart"
20
start_precmd="dhclient_prestart"
19
stop_precmd="dhclient_pre_check"
21
stop_precmd="dhclient_pre_check"
20
22
21
# rc_force check can only be done at the run_rc_command
23
# rc_force check can only be done at the run_rc_command
22
# time, so we're testing it in the pre* hooks.
24
# time, so we're testing it in the pre* hooks.
23
dhclient_pre_check()
25
dhclient_pre_check()
24
{
26
{
Lines 32-45 Link Here
32
		fi
34
		fi
33
		exit 1
35
		exit 1
34
	fi
36
	fi
35
}
37
}
36
38
37
dhclient_prestart()
39
dhclient_prestart()
38
{
40
{
41
	local dir
42
43
	for dir in ${piddir}; do
44
		debug "checking $dir"
45
		[ -d ${dir} ] || mkdir ${dir}
46
		chmod $piddir_mode ${dir}
47
	done
39
	dhclient_pre_check
48
	dhclient_pre_check
40
49
41
	# Interface-specific flags (see rc.subr for $flags setting)
50
	# Interface-specific flags (see rc.subr for $flags setting)
42
	specific=$(get_if_var $ifn dhclient_flags_IF)
51
	specific=$(get_if_var $ifn dhclient_flags_IF)
43
	if [ -z "$flags" -a -n "$specific" ]; then
52
	if [ -z "$flags" -a -n "$specific" ]; then
44
		rc_flags=$specific
53
		rc_flags=$specific
45
	fi
54
	fi

Return to bug 247562