#!/bin/sh
#
# $MidnightBSD: stable/0.7/etc/rc.d/dhcp6c 6634 2014-04-10 10:26:49Z laffer1 $

# PROVIDE: dhcp6c
# REQUIRE: DAEMON
# BEFORE: firstboot
# KEYWORD: nojail shutdown

. /etc/rc.subr
. /etc/network.subr

name="dhcp6c"
rcvar=${name}_enable

command="/sbin/${name}"
start_precmd="${name}_precmd"

load_rc_config $name

required_files="${dhcp6c_config}"
pidfile="/var/run/${name}.pid"
command_args="-c ${dhcp6c_config} -p ${dhcp6c_pidfile} ${dhcp6c_flags} ${dhcp6c_interfaces}"

dhcp6c_precmd()
{
	if [ -z ${dhcp6c_interfaces} ]; then
		warn "dhcp6c_interfaces is not set."
		return 1
	fi
}

run_rc_command "$1"
