Package: vsftpd
Version: 2.0.7-1
Severity: minor
We had a problem using heartbeat with /etc/init.d/vsftpd. When vsftpd
is already running and the initscript is invoked a second time with
"start" error code 1 is returned.
According to the Debian Policy[1] error code 0 is expected. Find attached a patch which solved our
problem.
[1]
http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
"The init.d scripts must ensure that they will behave sensibly (i.e.,
returning success and not starting multiple copies of a service) if
invoked with start when the service is already running, or with stop when
it isn't, and that they don't kill unfortunately-named user processes. The
best way achieve this is usually to use start-stop-daemon with the
--oknodo option."
--- vsftpd.orig 2009-01-31 01:07:35.000000000 +0100
+++ vsftpd 2010-08-11 10:15:56.000000000 +0200
@@ -30,7 +30,7 @@
start)
echo -n "Starting FTP server: $NAME"
[ -d /var/run/vsftpd ] || mkdir -p /var/run/vsftpd
- start-stop-daemon --start --background -m --pidfile /var/run/vsftpd/vsftpd.pid --exec $DAEMON
+ start-stop-daemon --start --background -m --pidfile /var/run/vsftpd/vsftpd.pid --oknodo --exec $DAEMON
echo "."
;;
stop)