View | Details | Raw Unified | Return to bug 229400 | Differences between
and this patch

Collapse All | Expand All

(-)net/dhcp6/files/dhcp6c.in (+7 lines)
Lines 16-21 Link Here
16
#		Set it to YES to enable dhcp6c.
16
#		Set it to YES to enable dhcp6c.
17
# dhcp6c_config (path):			Set to %%PREFIX%%/etc/dhcp6c.conf
17
# dhcp6c_config (path):			Set to %%PREFIX%%/etc/dhcp6c.conf
18
#		by default.
18
#		by default.
19
# dhcp6c_dhcp6cctlkey (path):		Set to %%PREFIX%%/etc/dhcp6cctlkey
20
#		by default.
19
# dhcp6c_pidfile (path):		Set to /var/run/dhcp6c.pid
21
# dhcp6c_pidfile (path):		Set to /var/run/dhcp6c.pid
20
#		by default.
22
#		by default.
21
# dhcp6c_interfaces (NIC list):		Not defined by default.
23
# dhcp6c_interfaces (NIC list):		Not defined by default.
Lines 35-40 Link Here
35
37
36
: ${dhcp6c_enable="NO"}
38
: ${dhcp6c_enable="NO"}
37
: ${dhcp6c_config="%%PREFIX%%/etc/${name}.conf"}
39
: ${dhcp6c_config="%%PREFIX%%/etc/${name}.conf"}
40
: ${dhcp6c_dhcp6cctlkey="%%PREFIX%%/etc/dhcp6cctlkey"}
38
: ${dhcp6c_pidfile="/var/run/${name}.pid"}
41
: ${dhcp6c_pidfile="/var/run/${name}.pid"}
39
42
40
required_files="${dhcp6c_config}"
43
required_files="${dhcp6c_config}"
Lines 47-52 Link Here
47
		warn "dhcp6c_interfaces is not set."
50
		warn "dhcp6c_interfaces is not set."
48
		return 1
51
		return 1
49
	fi
52
	fi
53
	if [ ! -s ${dhcp6c_dhcp6cctlkey} ]; then
54
		echo "Creating ${dhcp6c_dhcp6cctlkey}"
55
		(umask 077 ; openssl rand -base64 48 > ${dhcp6c_dhcp6cctlkey})
56
	fi
50
}
57
}
51
58
52
run_rc_command "$1"
59
run_rc_command "$1"

Return to bug 229400