- 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.
This commit is contained in:
Dirk Meyer 2009-01-17 06:04:20 +00:00
parent d39aece6e5
commit b5357693b1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226295
3 changed files with 22 additions and 7 deletions

View file

@ -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}

View file

@ -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
}

View file

@ -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}'"