diff options
author | Doug Barton <dougb@FreeBSD.org> | 2012-08-05 23:19:36 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2012-08-05 23:19:36 +0000 |
commit | 9aac569eaa031e27191a3f4165b389a17f467ad2 (patch) | |
tree | 1ed78841e1757014ccc09581c61c3683992d3f77 /net/dhcp6/files/dhcp6c.in | |
parent | When installing in the base, USE_RCORDER does the right thing without (diff) |
Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file
No PORTREVISION bump necessary because this is a no-op
Diffstat (limited to 'net/dhcp6/files/dhcp6c.in')
-rw-r--r-- | net/dhcp6/files/dhcp6c.in | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/net/dhcp6/files/dhcp6c.in b/net/dhcp6/files/dhcp6c.in new file mode 100644 index 000000000000..1054a0995bac --- /dev/null +++ b/net/dhcp6/files/dhcp6c.in @@ -0,0 +1,52 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dhcp6c +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to +# /etc/rc.conf.d/dhcp6c /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# dhcp6c_enable (bool): Set to NO by default. +# Set it to YES to enable dhcp6c. +# dhcp6c_config (path): Set to %%PREFIX%%/etc/dhcp6c.conf +# by default. +# dhcp6c_pidfile (path): Set to /var/run/dhcp6c.pid +# by default. +# dhcp6c_interfaces (NIC list): Not defined by default. +# Set it to the network interface(s) where dhcp6c should work on. +# dhcp6c_flags (additional arguments): Not defined by default. +# + +. /etc/rc.subr + +name="dhcp6c" +rcvar=dhcp6c_enable + +command="%%PREFIX%%/sbin/${name}" +start_precmd="${name}_precmd" + +load_rc_config $name + +: ${dhcp6c_enable="NO"} +: ${dhcp6c_config="%%PREFIX%%/etc/${name}.conf"} +: ${dhcp6c_pidfile="/var/run/${name}.pid"} + +required_files="${dhcp6c_config}" +pidfile="${dhcp6c_pidfile}" +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" |