ports/87354: [PATCH]: make ftp/vsftpd install rc files

Wesley Shields wxs at csh.rit.edu
Thu Oct 13 01:40:17 UTC 2005


>Number:         87354
>Category:       ports
>Synopsis:       [PATCH]: make ftp/vsftpd install rc files
>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:   Thu Oct 13 01:40:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Wesley Shields
>Release:        FreeBSD 5.4-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD syn 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #4: Tue Oct 11 10:45:25 EST 2005 root at syn:/usr/obj/usr/src/sys/GENERIC i386

>Description:
A recent suggestion on ports@ said ftp/vsftpd should install it's rc
files all the time.  I've moved it out from the OPTIONS and they will be
installed by default now.

I've CC'ed the maintainer on this.

>How-To-Repeat:
N/A

>Fix:

diff -ruN ftp/vsftpd.orig/Makefile ftp/vsftpd/Makefile
--- ftp/vsftpd.orig/Makefile	Wed Oct 12 20:53:27 2005
+++ ftp/vsftpd/Makefile	Wed Oct 12 20:55:31 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	vsftpd
 PORTVERSION=	2.0.3
+PORTREVISION=	1
 CATEGORIES=	ftp ipv6
 MASTER_SITES=	ftp://vsftpd.beasts.org/users/cevans/
 PKGNAMESUFFIX?=	${SSL_SUFFIX}${PKGNAMESUFFIX2}
@@ -24,17 +25,11 @@
 
 LDFLAGS+=	-lwrap
 
-OPTIONS=	RC_NG		"install RC_NG script"		off \
-		VSFTPD_SSL	"Include support for SSL"	off
+OPTIONS=	VSFTPD_SSL	"Include support for SSL"	off
 
-.include <bsd.port.pre.mk>
+USE_RC_SUBR=	vsftpd.sh
 
-.if defined(WITH_RC_NG)
-USE_RC_SUBR=	yes
-PLIST_SUB+=	RC_NG=""
-.else
-PLIST_SUB+=	RC_NG="@comment "
-.endif
+.include <bsd.port.pre.mk>
 
 .if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
 .include "${PORTSDIR}/Mk/bsd.openssl.mk"
@@ -46,10 +41,6 @@
 .endif
 
 do-configure:
-.if defined(WITH_RC_NG)
-	@${SED} -e 's,%%RC_SUBR%%,${RC_SUBR},g' -e 's,%%PREFIX%%,${PREFIX},g' \
-		${FILESDIR}/${PORTNAME}.sh >${WRKDIR}/${PORTNAME}.sh
-.endif
 	${REINPLACE_CMD} -e "s=/etc/vsftpd.conf=${PREFIX}/etc/vsftpd.conf=" \
 		${WRKSRC}/defs.h
 	${REINPLACE_CMD} \
@@ -96,9 +87,6 @@
 	${CP} -p -R -L ${WRKSRC}/${i}/./ ${DOCSDIR}/${i}/
 	${CHMOD} -R -L a+rX,go-w ${DOCSDIR}/${i}/
 .endfor
-.endif
-.if defined(WITH_RC_NG)
-	@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh
 .endif
 
 .include <bsd.port.post.mk>
diff -ruN ftp/vsftpd.orig/files/vsftpd.sh ftp/vsftpd/files/vsftpd.sh
--- ftp/vsftpd.orig/files/vsftpd.sh	Wed Oct 12 20:53:27 2005
+++ ftp/vsftpd/files/vsftpd.sh	Wed Oct 12 20:54:00 2005
@@ -1,42 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/ftp/vsftpd/files/vsftpd.sh,v 1.1 2005/05/02 10:40:20 dinoex Exp $
-#
-
-# PROVIDE: vsftpd
-# REQUIRE: DAEMON
-# KEYWORD: FreeBSD
-
-# Add the following line to /etc/rc.conf to enable `vsftpd':
-#
-# vsftpd_enable="YES"
-# vsftpd_flags="/some/path/conf.file" # Not required
-#
-
-. "%%RC_SUBR%%"
-
-name="vsftpd"
-rcvar=`set_rcvar`
-
-load_rc_config "$name"
-: ${vsftpd_enable="NO"}
-: ${vsftpd_flags=""}
-
-command="%%PREFIX%%/libexec/$name ${vsftpd_flags}"
-required_files="%%PREFIX%%/etc/$name.conf"
-
-vsftpd_check()
-{
-	cat ${required_files} | egrep -E "^listen.*=.*YES$" > /dev/null
-	if [ $? = 1 ]; then
-		err 1 "vsftpd script need "listen=YES" on config file"
-	fi
-	cat ${required_files} | egrep -E "^background.*=.*YES$" > /dev/null
-	if [ $? = 1 ]; then
-		err 1 "vsftpd script need "background=YES" on config file"
-	fi
-}
-
-vsftpd_check
-
-run_rc_command "$1"
diff -ruN ftp/vsftpd.orig/files/vsftpd.sh.in ftp/vsftpd/files/vsftpd.sh.in
--- ftp/vsftpd.orig/files/vsftpd.sh.in	Wed Dec 31 19:00:00 1969
+++ ftp/vsftpd/files/vsftpd.sh.in	Wed Oct 12 20:54:00 2005
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/ftp/vsftpd/files/vsftpd.sh,v 1.1 2005/05/02 10:40:20 dinoex Exp $
+#
+
+# PROVIDE: vsftpd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+
+# Add the following line to /etc/rc.conf to enable `vsftpd':
+#
+# vsftpd_enable="YES"
+# vsftpd_flags="/some/path/conf.file" # Not required
+#
+
+. "%%RC_SUBR%%"
+
+name="vsftpd"
+rcvar=`set_rcvar`
+
+load_rc_config "$name"
+: ${vsftpd_enable="NO"}
+: ${vsftpd_flags=""}
+
+command="%%PREFIX%%/libexec/$name ${vsftpd_flags}"
+required_files="%%PREFIX%%/etc/$name.conf"
+
+vsftpd_check()
+{
+	cat ${required_files} | egrep -E "^listen.*=.*YES$" > /dev/null
+	if [ $? = 1 ]; then
+		err 1 "vsftpd script need "listen=YES" on config file"
+	fi
+	cat ${required_files} | egrep -E "^background.*=.*YES$" > /dev/null
+	if [ $? = 1 ]; then
+		err 1 "vsftpd script need "background=YES" on config file"
+	fi
+}
+
+vsftpd_check
+
+run_rc_command "$1"
diff -ruN ftp/vsftpd.orig/pkg-plist ftp/vsftpd/pkg-plist
--- ftp/vsftpd.orig/pkg-plist	Wed Oct 12 20:53:27 2005
+++ ftp/vsftpd/pkg-plist	Wed Oct 12 20:54:00 2005
@@ -4,7 +4,6 @@
 etc/vsftpd.conf.dist
 @exec if [ ! -f %B/vsftpd.conf ]; then cp %B/vsftpd.conf.dist %B/vsftpd.conf; fi
 @exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi
-%%RC_NG%%etc/rc.d/vsftpd.sh
 @unexec rmdir /var/ftp 2>/dev/null || true
 @dirrm share/vsftpd/empty
 @dirrm share/vsftpd
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list