summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2010-07-17 12:22:30 +0000
committerLars Wendler <polynomial-c@gentoo.org>2010-07-17 12:22:30 +0000
commit3310afb19cc1f7d8991678b523cbe49049db07a3 (patch)
tree958bf4f098c25daa430714d6edebb164928d18b2 /net-ftp
parentVersion bump (diff)
downloadgentoo-2-3310afb19cc1f7d8991678b523cbe49049db07a3.tar.gz
gentoo-2-3310afb19cc1f7d8991678b523cbe49049db07a3.tar.bz2
gentoo-2-3310afb19cc1f7d8991678b523cbe49049db07a3.zip
Added a new init script which should wrk with both baselayout-1 and openrc.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/pure-ftpd/ChangeLog8
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd.rc959
-rw-r--r--net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild4
3 files changed, 68 insertions, 3 deletions
diff --git a/net-ftp/pure-ftpd/ChangeLog b/net-ftp/pure-ftpd/ChangeLog
index a6db855ca6ba..b3ef4730422a 100644
--- a/net-ftp/pure-ftpd/ChangeLog
+++ b/net-ftp/pure-ftpd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-ftp/pure-ftpd
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/ChangeLog,v 1.95 2010/07/17 08:59:46 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/ChangeLog,v 1.96 2010/07/17 12:22:29 polynomial-c Exp $
+
+ 17 Jul 2010; Lars Wendler <polynomial-c@gentoo.org>
+ pure-ftpd-1.0.29.ebuild, +files/pure-ftpd.rc9:
+ Added a new init script which should wrk with both baselayout-1 and
+ openrc. Keep the old (now unused) init script for a while until we can be
+ sure the new one causes no regressions.
17 Jul 2010; Lars Wendler <polynomial-c@gentoo.org>
-pure-ftpd-1.0.21-r1.ebuild, -files/pure-ftpd-1.0.21-pam.patch,
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.rc9 b/net-ftp/pure-ftpd/files/pure-ftpd.rc9
new file mode 100644
index 000000000000..46c7ea70c0f7
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd.rc9
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/files/pure-ftpd.rc9,v 1.1 2010/07/17 12:22:30 polynomial-c Exp $
+
+ftpd_pidfile="/var/run/pure-ftpd.pid"
+script_pidfile="/var/run/pure-uploadscript.pid"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "$IS_CONFIGURED" ] ; then
+ eerror "You need to setup /etc/conf.d/pure-ftpd first!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ # only works with openrc
+ WAIT=""
+ if [ -f /etc/init.d/sysfs ]; then
+ WAIT="--wait 100"
+ fi
+
+ UPSCRIPT=""
+ OKNODO=""
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ UPSCRIPT="--uploadscript"
+ OKNODO="--oknodo"
+ fi
+ ebegin "Starting Pure-FTPd"
+ start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} $OKNODO --exec /usr/sbin/pure-ftpd ${WAIT} -- --pidfile ${ftpd_pidfile} $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT
+ result=$?
+ if [ $result -ne 0 ] ; then
+ eend 1 "Could not launch Pure-FTPd"
+ else
+ eend $result
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ ebegin "Starting Pure-FTPd upload script"
+ start-stop-daemon --start --quiet --make-pidfile --pidfile ${script_pidfile} --exec /usr/sbin/pure-uploadscript -- -B -r $UPLOADSCRIPT
+ eend $?
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Stopping Pure-FTPd"
+ start-stop-daemon --stop --retry 20 --quiet --pidfile ${ftpd_pidfile}
+ eend $?
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ ebegin "Stopping Pure-FTPd upload script"
+ start-stop-daemon --stop --retry 20 --quiet --pidfile ${script_pidfile}
+ eend $?
+ fi
+}
diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild
index be17305c09f7..387f6568e25b 100644
--- a/net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild,v 1.3 2010/06/17 20:46:52 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.29.ebuild,v 1.4 2010/07/17 12:22:29 polynomial-c Exp $
EAPI=2
inherit eutils confutils flag-o-matic
@@ -88,7 +88,7 @@ src_install() {
newconfd "${FILESDIR}/pure-ftpd.conf_d" pure-ftpd
- newinitd "${FILESDIR}/pure-ftpd.rc8" pure-ftpd
+ newinitd "${FILESDIR}/pure-ftpd.rc9" pure-ftpd
if use xinetd ; then
insinto /etc/xinetd.d