diff options
author | Raúl Porcel <armin76@gentoo.org> | 2008-12-26 16:50:16 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2008-12-26 16:50:16 +0000 |
commit | 0a0871eab582fab01d3711118b26a867b17df598 (patch) | |
tree | f9377c38c1a38b833c1f5ade7b5a2d32fa54aafb /net-ftp/vsftpd/files | |
parent | ia64 stable wrt #252321 (diff) | |
download | gentoo-2-0a0871eab582fab01d3711118b26a867b17df598.tar.gz gentoo-2-0a0871eab582fab01d3711118b26a867b17df598.tar.bz2 gentoo-2-0a0871eab582fab01d3711118b26a867b17df598.zip |
Fix init script, bug 234278
(Portage version: 2.1.6.3/cvs/Linux 2.6.27-gentoo-r7 i686)
Diffstat (limited to 'net-ftp/vsftpd/files')
-rw-r--r-- | net-ftp/vsftpd/files/vsftpd.init | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net-ftp/vsftpd/files/vsftpd.init b/net-ftp/vsftpd/files/vsftpd.init index 8e280817bd98..e486e1fc0863 100644 --- a/net-ftp/vsftpd/files/vsftpd.init +++ b/net-ftp/vsftpd/files/vsftpd.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 2003-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v 1.6 2008/06/02 04:18:15 darkside Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v 1.7 2008/12/26 16:50:15 armin76 Exp $ VSFTPD_NAME=${SVCNAME##*.} if [ -n "${VSFTPD_NAME}" -a "${SVCNAME}" != "vsftpd" ]; then @@ -12,6 +12,7 @@ else VSFTPD_CONF_DEFAULT="/etc/vsftpd/vsftpd.conf" fi VSFTPD_CONF=${VSFTPD_CONF:-${VSFTPD_CONF_DEFAULT}} +VSFTPD_EXEC=${VSFTPD_EXEC:-/usr/sbin/vsftpd} depend() { need net @@ -48,7 +49,7 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting ${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/vsftpd \ + start-stop-daemon --start --exec ${VSFTPD_EXEC} \ --background --make-pidfile --pidfile "${VSFTPD_PID}" \ -- "${VSFTPD_CONF}" eend $? @@ -56,7 +57,12 @@ start() { stop() { ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/vsftpd + if [ -f ${VSFTPD_PID} ]; then + start-stop-daemon --stop --pidfile ${VSFTPD_PID} + else + ewarn "Couldn't found ${VSFTPD_PID} trying to stop over the process name ${SVCNAME}" + start-stop-daemon --stop --name ${SVCNAME} + fi eend $? } |