View | Details | Raw Unified | Return to bug 112246
Collapse All | Expand All

(-)./Makefile (-4 / +3 lines)
Lines 6-11 Link Here
6
6
7
PORTNAME=	www6to4
7
PORTNAME=	www6to4
8
PORTVERSION=	1.6
8
PORTVERSION=	1.6
9
PORTREVISION=	1
9
CATEGORIES=	www ipv6
10
CATEGORIES=	www ipv6
10
MASTER_SITES=	ftp://ftp.pasta.cs.uit.no/pub/Vermicelli/
11
MASTER_SITES=	ftp://ftp.pasta.cs.uit.no/pub/Vermicelli/
11
12
Lines 14-19 Link Here
14
15
15
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/./-/}
16
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/./-/}
16
17
18
USE_RC_SUBR=	www6to4
19
17
post-patch:
20
post-patch:
18
	@${REINPLACE_CMD} -e 's,/etc,${PREFIX}/etc,' \
21
	@${REINPLACE_CMD} -e 's,/etc,${PREFIX}/etc,' \
19
		${WRKSRC}/www6to4.c
22
		${WRKSRC}/www6to4.c
Lines 31-39 Link Here
31
	${INSTALL_DATA} ${WRKSRC}/README \
34
	${INSTALL_DATA} ${WRKSRC}/README \
32
		${DOCSDIR}
35
		${DOCSDIR}
33
.endif
36
.endif
34
	@if [ ! -f ${PREFIX}/etc/rc.d/www6to4.sh ]; then \
35
		${ECHO} "Installing ${PREFIX}/etc/rc.d/www6to4.sh startup file."; \
36
		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/www6to4.sh ${PREFIX}/etc/rc.d/www6to4.sh; \
37
	fi
38
37
39
.include <bsd.port.mk>
38
.include <bsd.port.mk>
(-)./files/www6to4.in (+37 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
#
4
# PROVIDE: www6to4
5
# REQUIRE: DAEMON
6
#
7
# Add the following to /etc/rc.conf[.local] to enable this service
8
#
9
# www6to4_enable="YES"
10
#
11
12
. %%RC_SUBR%%
13
14
name=www6to4
15
rcvar=`set_rcvar`
16
17
command=%%PREFIX%%/sbin/www6to4
18
WWW6TO4DIR=%%PREFIX%%/etc/www6to4
19
20
www6to4_enable=${www6to4_enable:-"NO"}
21
www6to4_config=${www6to4_config:-"${WWW6TO4DIR}/www6to4.conf"}
22
www6to4_flags=${www6to4_flags:-"-c ${www6to4_config}"}
23
www6to4_user=${www6to4_user:-"nobody"}
24
www6to4_chdir=${WWW6TO4DIR}
25
26
required_files=${www6to4_config}
27
required_dirs=${WWW6TO4DIR}
28
29
start_cmd=www6to4_start
30
31
www6to4_start() {
32
    checkyesno www6to4_enable && echo "Starting ${name}." && \
33
    chdir ${www6to4_chdir} && su -m ${www6to4_user} -c "$command ${www6to4_flags} &"
34
}
35
36
load_rc_config ${name}
37
run_rc_command "$1"
(-)./files/www6to4.sh (-41 lines)
Lines 1-41 Link Here
1
#!/bin/sh
2
# $FreeBSD: ports/www/www6to4/files/www6to4.sh,v 1.1 2002/09/10 21:36:05 obraun Exp $
3
4
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
5
	echo "$0: Cannot determine the PREFIX" >&2
6
	exit 1
7
fi
8
9
WWW6TO4DIR=${PREFIX}/etc/www6to4
10
11
12
case $1 in
13
start)
14
	if [ -d ${WWW6TO4DIR} \
15
	     -a -x ${PREFIX}/sbin/www6to4 \
16
	     -a -f ${WWW6TO4DIR}/www6to4.conf ]; then
17
		: seems OK
18
	else
19
		echo >&2 "$0: missing files!"
20
		exit 1
21
	fi
22
	cd ${WWW6TO4DIR}
23
	su -m nobody -c "${PREFIX}/sbin/www6to4 &" \
24
	    >/dev/null \
25
	&& echo -n " www6to4" \
26
	|| echo " www6to4 FAILED TO START"
27
	;;
28
stop)
29
	killall www6to4 && echo -n " www6to4"
30
	;;
31
restart)
32
	$0 stop
33
	$0 start
34
	;;
35
*)
36
	echo "Usage: `basename $0` {start|stop}" >&2
37
	exit 64
38
	;;
39
esac
40
41
exit 0
(-)./pkg-plist (-1 lines)
Lines 1-7 Link Here
1
sbin/www6to4
1
sbin/www6to4
2
etc/www6to4/www6to4.conf.sample
2
etc/www6to4/www6to4.conf.sample
3
etc/www6to4/www6to4_forward.conf.sample
3
etc/www6to4/www6to4_forward.conf.sample
4
etc/rc.d/www6to4.sh
5
%%PORTDOCS%%%%DOCSDIR%%/README
4
%%PORTDOCS%%%%DOCSDIR%%/README
6
@dirrm etc/www6to4
5
@dirrm etc/www6to4
7
%%PORTDOCS%%@dirrm %%DOCSDIR%%
6
%%PORTDOCS%%@dirrm %%DOCSDIR%%

Return to bug 112246