Bug 187678 - [PATCH] ftp/proftpd: Allow config path to be set from rc.conf
Summary: [PATCH] ftp/proftpd: Allow config path to be set from rc.conf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Matuska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 22:40 UTC by Daniel Ylitalo
Modified: 2014-03-27 23:52 UTC (History)
0 users

See Also:


Attachments
file.diff (713 bytes, patch)
2014-03-17 22:40 UTC, Daniel Ylitalo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Ylitalo 2014-03-17 22:40:00 UTC
Many ports allow one to specify a custom path to the config in rc.conf so that one wont have to re-edit the rc.d script after each update (which overwrites the rc.d file)

Fix: Attaching patch

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-18 11:54:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-03-27 23:31:56 UTC
Author: mm
Date: Thu Mar 27 23:31:52 2014
New Revision: 349374
URL: http://svnweb.freebsd.org/changeset/ports/349374
QAT: https://qat.redports.org/buildarchive/r349374/

Log:
  Allow specification of custom ProFTPD configuration file
  
  PR:		ports/187678
  Submitted by: 	Daniel Ylitalo <daniel@blodan.se>

Modified:
  head/ftp/proftpd/Makefile
  head/ftp/proftpd/files/proftpd.in

Modified: head/ftp/proftpd/Makefile
==============================================================================
--- head/ftp/proftpd/Makefile	Thu Mar 27 23:26:04 2014	(r349373)
+++ head/ftp/proftpd/Makefile	Thu Mar 27 23:31:52 2014	(r349374)
@@ -5,7 +5,7 @@ PORTNAME?=	proftpd
 .if !defined(DISTVERSION)
 PORTVERSION?=	${PROFTPD_VERSION}
 .endif
-PORTREVISION?=	4
+PORTREVISION?=	5
 CATEGORIES?=	ftp
 MASTER_SITES=	ftp://ftp.proftpd.org/distrib/source/ \
 		https://github.com/downloads/proftpd/proftpd.github.com/ \

Modified: head/ftp/proftpd/files/proftpd.in
==============================================================================
--- head/ftp/proftpd/files/proftpd.in	Thu Mar 27 23:26:04 2014	(r349373)
+++ head/ftp/proftpd/files/proftpd.in	Thu Mar 27 23:31:52 2014	(r349374)
@@ -22,22 +22,20 @@
 name=proftpd
 rcvar=proftpd_enable
 
+proftpd_enable=${proftpd_enable:="NO"}
+proftpd_config=${proftpd_config:="%%PREFIX%%/etc/proftpd.conf"}
+
 command=%%PREFIX%%/sbin/proftpd
-pidfile=$(grep PidFile /usr/local/etc/proftpd.conf | awk '{print($2)}')
-required_files=%%PREFIX%%/etc/proftpd.conf
+command_args="-c ${proftpd_config}"
+pidfile=$(grep PidFile ${proftpd_config} | awk '{print($2)}')
+required_files=${proftpd_config}
 
+extra_commands="reload"
 stop_postcmd=stop_postcmd
-
 stop_postcmd()
 {
   rm -f $pidfile
 }
 
-# set defaults
-
-proftpd_enable=${proftpd_enable:-"NO"}
-
-extra_commands="reload"
-
 load_rc_config $name
 run_rc_command "$1"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Martin Matuska freebsd_committer freebsd_triage 2014-03-27 23:52:50 UTC
State Changed
From-To: open->closed

Committed. Thanks!