blob: 786b186086db49536c02073b340b835a9d518e2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
# PROVIDE: dhcp6s
# REQUIRE: dhcp6c DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following lines to
# /etc/rc.conf.d/dhcp6s /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# dhcp6s_enable (bool): Set to NO by default.
# Set it to YES to enable dhcp6s.
# dhcp6s_config (path): Set to %%PREFIX%%/etc/dhcp6s.conf
# by default.
# dhcp6s_interface (NIC): Not defined by default.
# Set it to the network interface where dhcp6s should work on.
# dhcp6s_flags (additional arguments): Not defined by default.
#
. /etc/rc.subr
name="dhcp6s"
rcvar=dhcp6s_enable
command=%%PREFIX%%/sbin/${name}
start_precmd="${name}_precmd"
load_rc_config $name
: ${dhcp6s_enable="NO"}
: ${dhcp6s_config="%%PREFIX%%/etc/${name}.conf"}
required_files=${dhcp6s_config}
command_args="-c ${dhcp6s_config} ${dhcp6s_interface}"
dhcp6s_precmd()
{
if [ -z ${dhcp6s_interface} ]; then
warn "dhcp6s_interface is not set."
return 1
fi
}
run_rc_command "$1"
|