From b5357693b1348d831930e1700fca30977d5faaa7 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Sat, 17 Jan 2009 06:04:20 +0000 Subject: - Fix pkg-install call script from the Makefile - Fix pkg-deinstall doesn't match the user used by pkg-install. - Fix comment at top of vsftpd.conf - Add commented-out versions of listen=YES and background=YES to match the rcNG script's expectations. - Add missing documentation on how to configure vsftpd to rcNG script. - Fix two typos in rcNG script. PR: 130509 Submitted by: Matthias Andree - small cleanups - fix escaping in rcNG script. --- ftp/vsftpd/Makefile | 13 ++++++++++--- ftp/vsftpd/files/vsftpd.sh.in | 14 +++++++++++--- ftp/vsftpd/pkg-deinstall | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) (limited to 'ftp') diff --git a/ftp/vsftpd/Makefile b/ftp/vsftpd/Makefile index 7e4e87ac298f..104d05819bc7 100644 --- a/ftp/vsftpd/Makefile +++ b/ftp/vsftpd/Makefile @@ -46,7 +46,7 @@ MAKE_ENV+= LDFLAGS="${LDFLAGS}" do-configure: ${REINPLACE_CMD} -e "s|/etc/vsftpd.conf|${PREFIX}/etc/vsftpd.conf|" \ - ${WRKSRC}/defs.h + ${WRKSRC}/defs.h ${WRKSRC}/vsftpd.conf ${REINPLACE_CMD} \ -e "s|^CC = gcc|CC = ${CC}|" \ -e "s|^CFLAGS =|CFLAGS = ${CFLAGS}|" \ @@ -55,8 +55,13 @@ do-configure: ${REINPLACE_CMD} -e \ "s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \ ${WRKSRC}/builddefs.h - ${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \ + @${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \ ${WRKSRC}/vsftpd.conf + @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "" + @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf \ + "# If using vsftpd in standalone mode, uncomment the next two lines:" + @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# listen=YES" + @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# background=YES" ${REINPLACE_CMD} -e "s|/etc/v|${PREFIX}/etc/v|" \ -e 's|delay_failed_logins|delay_failed_login|' \ -e 's|delay_successful_logins|delay_successful_login|' \ @@ -67,6 +72,9 @@ do-configure: ${WRKSRC}/builddefs.h .endif +pre-install: + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/vsftpd ${PREFIX}/libexec/ ${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${PREFIX}/etc/vsftpd.conf.dist @@ -81,7 +89,6 @@ do-install: @for i in ${MAN5} ; do \ ${INSTALL_MAN} -m 644 ${WRKSRC}/$${i} ${MANPREFIX}/man/man5/ ; \ done - ${SH} ${PKGINSTALL} ${MKDIR} /var/ftp .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} diff --git a/ftp/vsftpd/files/vsftpd.sh.in b/ftp/vsftpd/files/vsftpd.sh.in index 16e069ccf372..3ce7bb15982f 100644 --- a/ftp/vsftpd/files/vsftpd.sh.in +++ b/ftp/vsftpd/files/vsftpd.sh.in @@ -6,11 +6,19 @@ # PROVIDE: vsftpd # REQUIRE: DAEMON -# Add the following line to /etc/rc.conf to enable `vsftpd': +# To enable 'vsftpd' in standalone mode, you need to edit two files. +# 1. add the following line(s) to /etc/rc.conf to enable `vsftpd': # # vsftpd_enable="YES" # vsftpd_flags="/some/path/conf.file" # Not required # +# 2. tell vsftpd about standalone mode +# Edit %%PREFIX%%/etc/vsftpd.conf (or /some/path/conf.file) to contain +# +# listen=YES +# background=YES +# +# Samples are provided at the end of the configuration file. . "%%RC_SUBR%%" @@ -33,11 +41,11 @@ vsftpd_check() fi if ! egrep -q -i -E "^listen.*=.*YES$" ${required_files} then - err 1 "vsftpd script need "listen=YES" on config file" + err 1 'vsftpd script need "listen=YES" in config file' fi if ! egrep -q -i -E "^background.*=.*YES$" ${required_files} then - err 1 "vsftpd script need "background=YES" on config file" + err 1 'vsftpd script need "background=YES" in config file' fi } diff --git a/ftp/vsftpd/pkg-deinstall b/ftp/vsftpd/pkg-deinstall index ed72e4c47c25..96fbc043082b 100644 --- a/ftp/vsftpd/pkg-deinstall +++ b/ftp/vsftpd/pkg-deinstall @@ -6,7 +6,7 @@ if [ "$2" != "POST-DEINSTALL" ]; then exit 0 fi -USER=vsftpd +USER=ftp if pw usershow "${USER}" 2>/dev/null 1>&2; then echo "To delete FTP user permanently, use 'pw userdel ${USER}'" -- cgit v1.2.3