commit:     71358b809e7f83d15ccac961a52414d643efb6fe
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 20 14:17:47 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Apr 20 14:18:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71358b80

net-ftp/pure-ftpd: Drop "need net" dependency in openrc init script

Closes: https://bugs.gentoo.org/514860
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-ftp/pure-ftpd/files/pure-ftpd.rc11 | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.rc11 
b/net-ftp/pure-ftpd/files/pure-ftpd.rc11
index cc17b5afa12..35270ff3350 100644
--- a/net-ftp/pure-ftpd/files/pure-ftpd.rc11
+++ b/net-ftp/pure-ftpd/files/pure-ftpd.rc11
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 ftpd_pidfile="/var/run/pure-ftpd.pid"
@@ -9,11 +9,12 @@ daemon="/usr/sbin/pure-ftpd"
 script_daemon="/usr/sbin/pure-uploadscript"
 
 depend() {
-       need net
+       need localmount
+       use netmount
 }
 
 start_pre() {
-       if [ -z "$IS_CONFIGURED" ] ; then
+       if [ -z "${IS_CONFIGURED}" ] ; then
                eerror "You need to setup /etc/conf.d/pure-ftpd first!"
                return 1
        fi
@@ -21,7 +22,7 @@ start_pre() {
 
 start() {
        UPSCRIPT=""
-       if [ -n "$UPLOADSCRIPT" ] ; then
+       if [ -n "${UPLOADSCRIPT}" ] ; then
                UPSCRIPT="--uploadscript"
        fi
 
@@ -42,11 +43,11 @@ start() {
                --make-pidfile --background --exec /usr/sbin/pure-ftpd ${WAIT} \
                -- $(echo ${FTPD_CONFIG} | sed 
's@\([[:space:]]\+\|^\)-B\([[:space:]]\+\|$\)@\1@g')
        result=$?
-       if [ $result -ne 0 ] ; then
+       if [ ${result} -ne 0 ] ; then
                eend 1 "Could not launch Pure-FTPd"
        else
                eend $result
-               if [ -n "$UPLOADSCRIPT" ] ; then
+               if [ -n "${UPLOADSCRIPT}" ] ; then
                        ebegin "Starting Pure-FTPd upload script"
                        start-stop-daemon --start --quiet --make-pidfile \
                                 --pidfile ${script_pidfile} \
@@ -58,7 +59,7 @@ start() {
 }
 
 stop() {
-       if [ -n "$UPLOADSCRIPT" ] ; then
+       if [ -n "${UPLOADSCRIPT}" ] ; then
                ebegin "Stopping Pure-FTPd upload script"
                start-stop-daemon --stop --retry 20 --quiet \
                        --pidfile ${script_pidfile}

Reply via email to