From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 29 19:00:14 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A5BA16A402 for ; Sun, 29 Apr 2007 19:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 38EFD13C448 for ; Sun, 29 Apr 2007 19:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3TJ0DNx045193 for ; Sun, 29 Apr 2007 19:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3TJ0Dic045192; Sun, 29 Apr 2007 19:00:13 GMT (envelope-from gnats) Resent-Date: Sun, 29 Apr 2007 19:00:13 GMT Resent-Message-Id: <200704291900.l3TJ0Dic045192@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, NAKAJI Hiroyuki Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 09A8E16A400 for ; Sun, 29 Apr 2007 18:59:56 +0000 (UTC) (envelope-from nakaji@ra333.heimat.gr.jp) Received: from www.heimat.gr.jp (www.heimat.gr.jp [60.32.13.194]) by mx1.freebsd.org (Postfix) with ESMTP id 9278B13C483 for ; Sun, 29 Apr 2007 18:59:55 +0000 (UTC) (envelope-from nakaji@ra333.heimat.gr.jp) Received: from ra333.heimat.gr.jp ([IPv6:2001:3e0:a84:0:200:4cff:fe17:573c]) by www.heimat.gr.jp (8.13.8/8.13.8) with ESMTP id l3TIXCrr082301; Mon, 30 Apr 2007 03:33:15 +0900 (JST) (envelope-from nakaji@ra333.heimat.gr.jp) Received: (from nakaji@localhost) by ra333.heimat.gr.jp (8.13.8/8.13.8/Submit) id l3TIXBZf056794; Mon, 30 Apr 2007 03:33:11 +0900 (JST) (envelope-from nakaji) Message-Id: <200704291833.l3TIXBZf056794@ra333.heimat.gr.jp> Date: Mon, 30 Apr 2007 03:33:11 +0900 (JST) From: NAKAJI Hiroyuki To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: janos.mohacsi@bsd.hu Subject: ports/112246: www/www6to4 use USE_RC_SUBR X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: NAKAJI Hiroyuki List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2007 19:00:14 -0000 >Number: 112246 >Category: ports >Synopsis: www/www6to4 use USE_RC_SUBR >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Apr 29 19:00:12 GMT 2007 >Closed-Date: >Last-Modified: >Originator: NAKAJI Hiroyuki >Release: FreeBSD 7.0-CURRENT pc98 >Organization: >Environment: System: FreeBSD ra333.heimat.gr.jp 7.0-CURRENT FreeBSD 7.0-CURRENT #51: Sun Mar 4 23:13:34 JST 2007 root@ra333.heimat.gr.jp:/usr/obj/usr/src/sys/RA333 pc98 >Description: I modified the startup script to rc.subr style. >How-To-Repeat: >Fix: diff -urN -x CVS /usr/ports/www/www6to4/Makefile ./Makefile --- /usr/ports/www/www6to4/Makefile Sat Oct 7 23:51:11 2006 +++ ./Makefile Mon Apr 30 02:31:23 2007 @@ -6,6 +6,7 @@ PORTNAME= www6to4 PORTVERSION= 1.6 +PORTREVISION= 1 CATEGORIES= www ipv6 MASTER_SITES= ftp://ftp.pasta.cs.uit.no/pub/Vermicelli/ @@ -14,6 +15,8 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/./-/} +USE_RC_SUBR= www6to4 + post-patch: @${REINPLACE_CMD} -e 's,/etc,${PREFIX}/etc,' \ ${WRKSRC}/www6to4.c @@ -31,9 +34,5 @@ ${INSTALL_DATA} ${WRKSRC}/README \ ${DOCSDIR} .endif - @if [ ! -f ${PREFIX}/etc/rc.d/www6to4.sh ]; then \ - ${ECHO} "Installing ${PREFIX}/etc/rc.d/www6to4.sh startup file."; \ - ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/www6to4.sh ${PREFIX}/etc/rc.d/www6to4.sh; \ - fi .include diff -urN -x CVS /usr/ports/www/www6to4/files/www6to4.in ./files/www6to4.in --- /usr/ports/www/www6to4/files/www6to4.in Thu Jan 1 09:00:00 1970 +++ ./files/www6to4.in Mon Apr 30 03:16:00 2007 @@ -0,0 +1,37 @@ +#!/bin/sh +# $FreeBSD$ +# +# PROVIDE: www6to4 +# REQUIRE: DAEMON +# +# Add the following to /etc/rc.conf[.local] to enable this service +# +# www6to4_enable="YES" +# + +. %%RC_SUBR%% + +name=www6to4 +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/www6to4 +WWW6TO4DIR=%%PREFIX%%/etc/www6to4 + +www6to4_enable=${www6to4_enable:-"NO"} +www6to4_config=${www6to4_config:-"${WWW6TO4DIR}/www6to4.conf"} +www6to4_flags=${www6to4_flags:-"-c ${www6to4_config}"} +www6to4_user=${www6to4_user:-"nobody"} +www6to4_chdir=${WWW6TO4DIR} + +required_files=${www6to4_config} +required_dirs=${WWW6TO4DIR} + +start_cmd=www6to4_start + +www6to4_start() { + checkyesno www6to4_enable && echo "Starting ${name}." && \ + chdir ${www6to4_chdir} && su -m ${www6to4_user} -c "$command ${www6to4_flags} &" +} + +load_rc_config ${name} +run_rc_command "$1" diff -urN -x CVS /usr/ports/www/www6to4/files/www6to4.sh ./files/www6to4.sh --- /usr/ports/www/www6to4/files/www6to4.sh Wed Sep 11 06:36:05 2002 +++ ./files/www6to4.sh Thu Jan 1 09:00:00 1970 @@ -1,41 +0,0 @@ -#!/bin/sh -# $FreeBSD: ports/www/www6to4/files/www6to4.sh,v 1.1 2002/09/10 21:36:05 obraun Exp $ - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -WWW6TO4DIR=${PREFIX}/etc/www6to4 - - -case $1 in -start) - if [ -d ${WWW6TO4DIR} \ - -a -x ${PREFIX}/sbin/www6to4 \ - -a -f ${WWW6TO4DIR}/www6to4.conf ]; then - : seems OK - else - echo >&2 "$0: missing files!" - exit 1 - fi - cd ${WWW6TO4DIR} - su -m nobody -c "${PREFIX}/sbin/www6to4 &" \ - >/dev/null \ - && echo -n " www6to4" \ - || echo " www6to4 FAILED TO START" - ;; -stop) - killall www6to4 && echo -n " www6to4" - ;; -restart) - $0 stop - $0 start - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac - -exit 0 diff -urN -x CVS /usr/ports/www/www6to4/pkg-plist ./pkg-plist --- /usr/ports/www/www6to4/pkg-plist Sat Oct 7 23:51:11 2006 +++ ./pkg-plist Mon Apr 30 03:06:42 2007 @@ -1,7 +1,6 @@ sbin/www6to4 etc/www6to4/www6to4.conf.sample etc/www6to4/www6to4_forward.conf.sample -etc/rc.d/www6to4.sh %%PORTDOCS%%%%DOCSDIR%%/README @dirrm etc/www6to4 %%PORTDOCS%%@dirrm %%DOCSDIR%% >Release-Note: >Audit-Trail: >Unformatted: