1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Switch to a rc.d startup script.

- Remove obsolete USE_REINPLACE.

Approved by:	netchild
This commit is contained in:
Marius Strobl 2006-02-20 12:38:27 +00:00
parent 424cfcab59
commit d4fa79a903
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=156484
5 changed files with 64 additions and 39 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= ftpd-tls
PORTVERSION= 20031008
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= ftp security
MASTER_SITES= ftp://ftp.zeist.de/pub/distfiles/
@ -16,34 +16,30 @@ COMMENT= Ftp server supporting FTP AUTH TLS
GNU_CONFIGURE= YES
USE_OPENSSL= YES
USE_REINPLACE= YES
USE_RC_SUBR= ftpd-tls.sh
MAN8= ftpd-tls.8
CONFIGURE_ARGS= --with-openssl-dir=${OPENSSLBASE}
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 400000
BROKEN= "Not supported on systems prior to FreeBSD 4.0 (missing getaddrinfo())"
.endif
CONFIGURE_ARGS= --with-openssl-dir=${OPENSSLBASE}
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
PKGMESSAGE= ${WRKDIR}/pkg-message
post-patch:
.for i in README.TLS ftpd.8.TLS pathnames.h tlsutil.c
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i}
.endfor
@${SED} 's|%%PREFIX%%|${PREFIX}|g; s|%%DOCSDIR%%|${DOCSDIR}|g' \
${PKGDIR}/pkg-message > ${WRKDIR}/pkg-message
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/ftpd-tls.sh > \
${WRKDIR}/ftpd-tls.sh
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/ftpd ${PREFIX}/libexec/ftpd-tls
@${INSTALL_MAN} ${WRKSRC}/ftpd.8.TLS ${PREFIX}/man/man8/ftpd-tls.8
@${INSTALL_SCRIPT} ${WRKDIR}/ftpd-tls.sh \
${PREFIX}/etc/rc.d/ftpd-tls.sh.sample
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for i in README.TLS draft-murray-auth-ftp-ssl-09.txt
@ -58,6 +54,10 @@ do-install:
@${INSTALL_DATA} /etc/ftpusers ${PREFIX}/etc/ftpd-tls
.endif
pre-install:
# Make sure there's no startup script left over from a previous installation.
@${RM} -f ${PREFIX}/etc/rc.d/ftpd-tls.sh
post-install:
@${CAT} ${WRKDIR}/pkg-message

View File

@ -1,22 +0,0 @@
#!/bin/sh
case "$1" in
start)
if [ -x %%PREFIX%%/libexec/ftpd-tls ]; then
%%PREFIX%%/libexec/ftpd-tls -DUl > /dev/null
echo -n ' ftpd-tls'
fi
;;
stop)
if [ -r /var/run/ftpd-tls.pid ]; then
kill -TERM `cat /var/run/ftpd-tls.pid`
rm -f /var/run/ftpd-tls.pid
echo -n ' ftpd-tls'
fi
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0

View File

@ -0,0 +1,42 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ftpd-tls
# REQUIRE: LOGIN
#
# Available configuration variables for ftpd-tls are:
#
# ftpd_tls_enable (bool): Set to "YES" to enable ftpd-tls.
# Defaults to "NO".
# ftpd_tls_flags (flags): Extra flags to ftpd-tls (see ftpd-tls(8)).
# Defaults to "-U -l".
#
# Add at least the following line to /etc/rc.conf or /etc/rc.conf.local to
# enable ftpd-tls:
#
# ftpd_tls_enable="YES"
#
. %%RC_SUBR%%
name="ftpd_tls"
rcvar=${name}_enable
command=%%PREFIX%%/libexec/ftpd-tls
command_args="> /dev/null"
start_precmd="ftpd_tls_precmd"
pidfile="/var/run/ftpd-tls.pid"
ftpd_tls_precmd()
{
rc_flags="${rc_flags} -D"
}
load_rc_config $name
: ${ftpd_tls_enable="NO"}
: ${ftpd_tls_flags="-U -l"}
run_rc_command "$1"

View File

@ -1,11 +1,17 @@
===========================================================================
Depending on how you would like to start ftpd-tls(8) either copy the
sample start-up script %%PREFIX%%/etc/rc.d/ftpd-tls.sh.sample to
%%PREFIX%%/etc/rc.d/ftpd-tls.sh or add the following two entries to
your /etc/inetd.conf:
ftp stream tcp nowait root %%PREFIX%%/libexec/ftpd-tls ftpd-tls -Ul
ftp stream tcp6 nowait root %%PREFIX%%/libexec/ftpd-tls ftpd-tls -Ul
Depending on how you would like to start ftpd-tls(8) you have two choices:
1) Add the following line to /etc/rc.conf or /etc/rc.conf.local:
ftpd_tls_enable="YES"
For further available configuration variables when using this method see
%%PREFIX%%/etc/rc.d/ftpd-tls{,.sh}.
2) Add the following entries to your /etc/inetd.conf:
ftp stream tcp nowait root %%PREFIX%%/libexec/ftpd-tls ftpd-tls -U -l
ftp stream tcp6 nowait root %%PREFIX%%/libexec/ftpd-tls ftpd-tls -U -l
See %%DOCSDIR%%/README.TLS and the openssl(1) manual
page for further information on how to generate the certificates and

View File

@ -1,4 +1,3 @@
etc/rc.d/ftpd-tls.sh.sample
libexec/ftpd-tls
%%PORTDOCS%%%%DOCSDIR%%/README.TLS
%%PORTDOCS%%%%DOCSDIR%%/draft-murray-auth-ftp-ssl-09.txt