diff options
author | marius <marius@FreeBSD.org> | 2006-02-20 20:38:27 +0800 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2006-02-20 20:38:27 +0800 |
commit | 834c11b7a65e2c6d37c89b97303b85be03990cb1 (patch) | |
tree | edb1e1bb8f9643751ed405876824b44d108a43be /ftp | |
parent | be25d3c4e7d2572e23818a0066032254f2791cab (diff) | |
download | freebsd-ports-gnome-834c11b7a65e2c6d37c89b97303b85be03990cb1.tar.gz freebsd-ports-gnome-834c11b7a65e2c6d37c89b97303b85be03990cb1.tar.zst freebsd-ports-gnome-834c11b7a65e2c6d37c89b97303b85be03990cb1.zip |
- Switch to a rc.d startup script.
- Remove obsolete USE_REINPLACE.
Approved by: netchild
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/ftpd-tls/Makefile | 20 | ||||
-rw-r--r-- | ftp/ftpd-tls/files/ftpd-tls.sh | 22 | ||||
-rw-r--r-- | ftp/ftpd-tls/files/ftpd-tls.sh.in | 42 | ||||
-rw-r--r-- | ftp/ftpd-tls/pkg-message | 18 | ||||
-rw-r--r-- | ftp/ftpd-tls/pkg-plist | 1 |
5 files changed, 64 insertions, 39 deletions
diff --git a/ftp/ftpd-tls/Makefile b/ftp/ftpd-tls/Makefile index a5b9329c7db4..04b3c4d23c11 100644 --- a/ftp/ftpd-tls/Makefile +++ b/ftp/ftpd-tls/Makefile @@ -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 diff --git a/ftp/ftpd-tls/files/ftpd-tls.sh b/ftp/ftpd-tls/files/ftpd-tls.sh deleted file mode 100644 index 9b9eb473d480..000000000000 --- a/ftp/ftpd-tls/files/ftpd-tls.sh +++ /dev/null @@ -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 diff --git a/ftp/ftpd-tls/files/ftpd-tls.sh.in b/ftp/ftpd-tls/files/ftpd-tls.sh.in new file mode 100644 index 000000000000..5e9bfe5bc562 --- /dev/null +++ b/ftp/ftpd-tls/files/ftpd-tls.sh.in @@ -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" diff --git a/ftp/ftpd-tls/pkg-message b/ftp/ftpd-tls/pkg-message index 5d443d4c7fbd..3be1d01ab658 100644 --- a/ftp/ftpd-tls/pkg-message +++ b/ftp/ftpd-tls/pkg-message @@ -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 diff --git a/ftp/ftpd-tls/pkg-plist b/ftp/ftpd-tls/pkg-plist index 82d69185471a..9e5cd11270d5 100644 --- a/ftp/ftpd-tls/pkg-plist +++ b/ftp/ftpd-tls/pkg-plist @@ -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 |