Date: Tue, 15 Jul 2008 21:01:06 GMT From: "Philip M. Gollucci" <pgollucci@p6m7g8.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: clement@FreeBSD.org Subject: ports/125651: [PATCH] ftp/moftpd: USE_RC_SUBR != yes Message-ID: <200807152101.m6FL16XB097030@riderwayinc.com> Resent-Message-ID: <200807152110.m6FLA3vk029661@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 125651 >Category: ports >Synopsis: [PATCH] ftp/moftpd: USE_RC_SUBR != yes >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: Tue Jul 15 21:10:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Philip M. Gollucci >Release: FreeBSD 7.0-RELEASE amd64 >Organization: Riderway Inc. >Environment: System: FreeBSD riderwayinc.com 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Thu Feb 28 21:20:48 UTC 2008 >Description: - Respect NO_INSTALL_MANPAGES - repocopy [files/moftpd.sh -> files/moftpd.in] itectu@: no more .sh dougb@: move load_config above variables checks - Bump PORTREVISION Added file(s): - files/moftpd.in Removed file(s): - files/moftpd.sh Port maintainer (clement@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- moftpd-1.2.3_7.patch begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/ftp/moftpd/Makefile,v retrieving revision 1.16 diff -u -u -r1.16 Makefile --- Makefile 3 Mar 2008 11:57:05 -0000 1.16 +++ Makefile 15 Jul 2008 21:00:23 -0000 @@ -7,7 +7,7 @@ PORTNAME= moftpd PORTVERSION= 1.2.3 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= ftp ipv6 MASTER_SITES= ftp://ftp.morth.org/moftpd/ \ ${MASTER_SITE_LOCAL} @@ -18,14 +18,15 @@ USE_AUTOTOOLS= autoconf:261 USE_GMAKE= yes -USE_RC_SUBR= yes +USE_RC_SUBR= moftpd USE_PERL5_BUILD=yes CONFIGURE_ENV+= LIBS="${LIBS}" CFLAGS="${CFLAGS}" CONFIGURE_ARGS= --localstatedir=/var +.if !defined (NO_INSTALL_MANPAGES) MAN8= moftpd.8 moftpadmin.8 +.endif LIBS+= -lcrypt -RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} .if defined(WITHOUT_TLS) CONFIGURE_ARGS+= --without-tls @@ -46,11 +47,4 @@ CONFIGURE_ARGS+= --without-sql .endif -post-patch: - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/moftpd.sh > ${WRKDIR}/moftpd.sh - -post-install: - @${INSTALL_SCRIPT} ${WRKDIR}/moftpd.sh ${PREFIX}/etc/rc.d/ - .include <bsd.port.mk> Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/ftp/moftpd/pkg-plist,v retrieving revision 1.3 diff -u -u -r1.3 pkg-plist --- pkg-plist 30 Nov 2004 21:25:02 -0000 1.3 +++ pkg-plist 15 Jul 2008 21:00:23 -0000 @@ -1,4 +1,3 @@ -etc/rc.d/moftpd.sh etc/moftpd.conf.dist sbin/moftpadmin sbin/moftpd Index: files/moftpd.in =================================================================== RCS file: files/moftpd.in diff -N files/moftpd.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/moftpd.in 15 Jul 2008 21:00:23 -0000 @@ -0,0 +1,42 @@ +#!/bin/sh +# +# $FreeBSD: ports/ftp/moftpd/files/moftpd.sh,v 1.2 2006/02/20 20:47:00 dougb Exp $ +# + +# PROVIDE: moftpd +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable moftpd: +# moftpd_enable (bool): Set to "NO" by default. +# moftpdlimits_enable (bool):Set to "NO" by default. +# Set it to yes to run `limits $limits_args` +# just before moftpd starts. +# moftpd_flags (str): Set to "" by default. +# Extra flags passed to start command +# moftpdlimits_args (str): Default to "-e -C daemon" +# Arguments of pre-start limits run. +# +. %%RC_SUBR%% + +name="moftpd" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/moftpd" +pidfile="/var/run/moftpd.pid" +required_files=%%PREFIX%%/etc/moftpd.conf + +load_rc_config $name + +[ -z "$moftpd_enable" ] && moftpd_enable="NO" +[ -z "$moftpd_flags" ] && moftpd_flags="" +[ -z "$moftpdlimits_enable" ] && moftpdlimits_enable="NO" +[ -z "$moftpdlimits_args" ] && moftpdlimits_args="-e -C daemon" + + +checkyesno moftpdlimits_enable && \ + start_precmd="eval `/usr/bin/limits ${moftpdlimits_args}` 2>/dev/null" + +run_rc_command "$1" Index: files/moftpd.sh =================================================================== RCS file: files/moftpd.sh diff -N files/moftpd.sh --- files/moftpd.sh 20 Feb 2006 20:47:00 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/ftp/moftpd/files/moftpd.sh,v 1.2 2006/02/20 20:47:00 dougb Exp $ -# - -# PROVIDE: moftpd -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable moftpd: -# moftpd_enable (bool): Set to "NO" by default. -# moftpdlimits_enable (bool):Set to "NO" by default. -# Set it to yes to run `limits $limits_args` -# just before moftpd starts. -# moftpd_flags (str): Set to "" by default. -# Extra flags passed to start command -# moftpdlimits_args (str): Default to "-e -C daemon" -# Arguments of pre-start limits run. -# -. %%RC_SUBR%% - -name="moftpd" -rcvar=`set_rcvar` - -command="%%PREFIX%%/sbin/moftpd" -pidfile="/var/run/moftpd.pid" -required_files=%%PREFIX%%/etc/moftpd.conf - -[ -z "$moftpd_enable" ] && moftpd_enable="NO" -[ -z "$moftpd_flags" ] && moftpd_flags="" -[ -z "$moftpdlimits_enable" ] && moftpdlimits_enable="NO" -[ -z "$moftpdlimits_args" ] && moftpdlimits_args="-e -C daemon" - -load_rc_config $name - -checkyesno moftpdlimits_enable && \ - start_precmd="eval `/usr/bin/limits ${moftpdlimits_args}` 2>/dev/null" - -run_rc_command "$1" --- moftpd-1.2.3_7.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807152101.m6FL16XB097030>