1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00
freebsd-ports/net/dhcp6/files/dhcp6s.sh.in
Doug Barton 1d6b4b3f91 Begin the process of deprecating sysutils/rc_subr by
s#. %%RC_SUBR%%#. /etc/rc.subr#
2010-03-27 00:15:24 +00:00

49 lines
1001 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dhcp6s
# REQUIRE: 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=${name}_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_flags} ${dhcp6s_interface}"
dhcp6s_precmd()
{
if [ -z ${dhcp6s_interface} ]; then
warn "dhcp6s_interface is not set."
return 1
fi
}
run_rc_command "$1"