Date: Thu, 13 May 2010 15:29:53 -0700 From: Jason Helfman <jhelfman@e-e.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/146556: [patch] ftp/vsftpd rc script doesn't support vsftpd_flags Message-ID: <20100513223125.544214A2E6E5@mail.experts-exchange.com> Resent-Message-ID: <201005132240.o4DMe5Qg023610@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 146556 >Category: ports >Synopsis: [patch] ftp/vsftpd rc script doesn't support vsftpd_flags >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 13 22:40:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Jason Helfman >Release: FreeBSD 7.2-RELEASE-p7 i386 >Organization: Experts-Exchange >Environment: System: FreeBSD eggman.experts-exchange.com 7.2-RELEASE-p7 FreeBSD 7.2-RELEASE-p7 #0: Fri Feb 26 19:51:57 UTC 2010 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: If vsftpd_flags is set in /etc/rc.conf to use a different configuration file, it will fail, as it is only considering the required default file in precmd. >How-To-Repeat: Add port ftp/vsftpd cp default /usr/local/etc/vsftpd.conf to /usr/local/etc/vsftpd_test.conf add vsftpd_enable="YES" to /etc/rc.conf add vsftpd_flags="/usr/local/etc/vsftpd_test.conf" run /usr/local/etc/rc.d/vsftpd start >Fix: --- /usr/ports/ftp/vsftpd/files/vsftpd.sh.in 2010-03-26 17:13:02.000000000 -0700 +++ /usr/ports/ftp/vsftpd/files/vsftpd.sh.in 2010-05-13 14:52:58.000000000 -0700 @@ -29,11 +29,16 @@ : ${vsftpd_enable:="NO"} command="%%PREFIX%%/libexec/$name" -required_files="%%PREFIX%%/etc/$name.conf" start_precmd="vsftpd_check" vsftpd_check() { + if [ -z ${vsftpd_flags} ]; then + required_files="%%PREFIX%%/etc/$name.conf" + else + required_files="${vsftpd_flags}" + fi + if grep -q "^ftp[ ]" /etc/inetd.conf ${required_files} then err 1 "ftp is already activated in /etc/inetd.conf" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100513223125.544214A2E6E5>