Add rc scripts.

Submitted by:	ume
This commit is contained in:
Munechika SUMIKAWA 2004-08-18 02:04:15 +00:00
parent 43d681d015
commit 992c828dd6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=116557
5 changed files with 128 additions and 6 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= dhcp6
PORTVERSION= 20040816a
CATEGORIES= net
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.kame.net/pub/kame/misc/
DISTNAME= kame-${PORTNAME}-${PORTVERSION}
@ -15,6 +15,7 @@ MAINTAINER= sumikawa@FreeBSD.org
COMMENT= KAME DHCP6 client and server
WRKSRC= ${WRKDIR}/${PORTNAME}
USE_RC_SUBR= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${LOCALBASE}/etc --with-localdbdir=/var/db
USE_REINPLACE= yes
@ -22,11 +23,19 @@ USE_REINPLACE= yes
MAN5= dhcp6c.conf.5 dhcp6s.conf.5
MAN8= dhcp6c.8 dhcp6s.8 dhcp6relay.8 dhcp6sctl.8
RC_SCRIPTS= dhcp6c.sh dhcp6relay.sh dhcp6s.sh
RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
RC_SUBR=${RC_SUBR}
post-patch:
.for file in ${MAN5} ${MAN8}
${REINPLACE_CMD} -e 's|/usr/local/v6/etc|${LOCALBASE}/etc|' \
${WRKSRC}/${file}
.endfor
.for f in ${RC_SCRIPTS}
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/${f} > ${WRKDIR}/${f}
.endfor
post-install:
.if !defined(NOPORTDOCS)
@ -35,5 +44,8 @@ post-install:
.endif
${INSTALL_DATA} ${WRKSRC}/dhcp6c.conf.sample ${PREFIX}/etc
${INSTALL_DATA} ${WRKSRC}/dhcp6s.conf.sample ${PREFIX}/etc
.for f in ${RC_SCRIPTS}
@${INSTALL_SCRIPT} ${WRKDIR}/${f} ${PREFIX}/etc/rc.d/${f}
.endfor
.include <bsd.port.mk>

36
net/dhcp6/files/dhcp6c.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dhcp6c
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move dhcp6c.sh to /etc/rc.d/dhcp6c
prefix=%%PREFIX%%
# Define these dhcp6c_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/dhcp6c
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
dhcp6c_enable=${dhcp6c_enable:-"NO"} # Enable dhcp6c
#dhcp6c_program="${prefix}/sbin/${name}" # Location of dhcp6c
#dhcp6c_flags="fxp0" # Flags to dhcp6c program
. %%RC_SUBR%%
name="dhcp6c"
rcvar=`set_rcvar`
command="${prefix}/sbin/${name}"
required_files="${prefix}/etc/${name}.conf"
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dhcp6relay
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move dhcp6relay.sh to /etc/rc.d/dhcp6relay
prefix=%%PREFIX%%
# Define these dhcp6relay_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/dhcp6relay
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
dhcp6relay_enable=${dhcp6relay_enable:-"NO"} # Enable dhcp6relay
#dhcp6relay_program="${prefix}/sbin/${name}" # Location of dhcp6relay
#dhcp6relay_flags="-r fxp1 fxp0" # Flags to dhcp6relay program
. %%RC_SUBR%%
name="dhcp6relay"
rcvar=`set_rcvar`
command="${prefix}/sbin/${name}"
load_rc_config $name
run_rc_command "$1"

36
net/dhcp6/files/dhcp6s.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dhcp6s
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move dhcp6s.sh to /etc/rc.d/dhcp6s
prefix=%%PREFIX%%
# Define these dhcp6s_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/dhcp6s
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
dhcp6s_enable=${dhcp6s_enable:-"NO"} # Enable dhcp6s
#dhcp6s_program="${prefix}/sbin/${name}" # Location of dhcp6s
#dhcp6s_flags="fxp0" # Flags to dhcp6s program
. %%RC_SUBR%%
name="dhcp6s"
rcvar=`set_rcvar`
command="${prefix}/sbin/${name}"
required_files="${prefix}/etc/${name}.conf"
load_rc_config $name
run_rc_command "$1"

View File

@ -1,9 +1,12 @@
sbin/dhcp6c
sbin/dhcp6s
sbin/dhcp6relay
sbin/dhcp6sctl
etc/dhcp6s.conf.sample
etc/dhcp6c.conf.sample
%%PORTDOCS%%%%DOCSDIR%%/README
etc/rc.d/dhcp6c.sh
etc/rc.d/dhcp6relay.sh
etc/rc.d/dhcp6s.sh
sbin/dhcp6c
sbin/dhcp6relay
sbin/dhcp6s
sbin/dhcp6sctl
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%