1 |
hwoarang 15/01/31 13:07:47 |
2 |
|
3 |
Modified: vsftpd.init |
4 |
Log: |
5 |
Make sure child processes are killed properly. Bug #537290 by rhumbliner |
6 |
|
7 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 09BF4F54C2BA7F3C!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.9 net-ftp/vsftpd/files/vsftpd.init |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init?rev=1.9&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init?rev=1.9&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init?r1=1.8&r2=1.9 |
15 |
|
16 |
Index: vsftpd.init |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v |
19 |
retrieving revision 1.8 |
20 |
retrieving revision 1.9 |
21 |
diff -u -r1.8 -r1.9 |
22 |
--- vsftpd.init 20 Apr 2013 16:51:02 -0000 1.8 |
23 |
+++ vsftpd.init 31 Jan 2015 13:07:47 -0000 1.9 |
24 |
@@ -1,7 +1,7 @@ |
25 |
#!/sbin/runscript |
26 |
-# Copyright 1999-2013 Gentoo Foundation |
27 |
+# Copyright 1999-2015 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License, v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v 1.8 2013/04/20 16:51:02 hwoarang Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v 1.9 2015/01/31 13:07:47 hwoarang Exp $ |
31 |
|
32 |
VSFTPD_NAME=${SVCNAME##*.} |
33 |
if [ -n "${VSFTPD_NAME}" -a "${SVCNAME}" != "vsftpd" ]; then |
34 |
@@ -35,13 +35,17 @@ |
35 |
|
36 |
stop() { |
37 |
ebegin "Stopping ${SVCNAME}" |
38 |
+ local retval=0 |
39 |
if [ -f ${VSFTPD_PID} ]; then |
40 |
- start-stop-daemon --stop --pidfile ${VSFTPD_PID} |
41 |
+ start-stop-daemon --stop --pidfile ${VSFTPD_PID} || retval=1 |
42 |
+ pkill --full ${VSFTPD_CONF} |
43 |
else |
44 |
- ewarn "Couldn't found ${VSFTPD_PID} trying to stop over the process name ${SVCNAME}" |
45 |
- start-stop-daemon --stop --name ${SVCNAME} |
46 |
+ ewarn "Couldn't find ${VSFTPD_PID} trying to stop using the config filename ${VSFTPD_CONF}" |
47 |
+ pgrep --full ${VSFTPD_CONF} > ${VSFTPD_PID} |
48 |
+ start-stop-daemon --stop --pidfile ${VSFTPD_PID} || retval=1 |
49 |
+ pkill --full ${VSFTPD_CONF} |
50 |
fi |
51 |
- eend $? |
52 |
+ eend ${retval} |
53 |
} |
54 |
|
55 |
# vim: ts=4 |