Bug#721201: proftpd-basic: Without sleep 2, doing /etc/init.d/proftpd restart doesn't restart the daemon, but only stops it.

2014-04-11 Thread Francesco P. Lovergine
On Mon, Apr 07, 2014 at 12:33:01PM +0200, Prisma Computer - G. Fischer wrote:
 Hello,
 
 I'm able to confirm this bug with ProFTPD Version 1.3.5rc3. This is an
 evil bug, leading to logrotate is killing proftpd. When is it expected
 to be fixed?
 
 Mit freundlichen Grüßen / Best regards
 
 Gregor Fischer
 
  start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
  $PIDFILE --retry=TERM/10/KILL/5

This version is already using the sleeping thanks to the --retry flag. You are
talking about what exactly? The next systemd will not appreciate sleeps
around in init scripts, so this is the proper way of fixing that issue.

-- 
Francesco P. Lovergine


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#721201: proftpd-basic: Without sleep 2, doing /etc/init.d/proftpd restart doesn't restart the daemon, but only stops it.

2014-04-11 Thread Prisma Computer - G. Fischer
Hello Francesco,

you're right. Sleep is no good solution. But my post is about:

if [ -f $PIDFILE ]; then
start-stop-daemon --stop --signal $SIGNAL --retry 1 --quiet
--pidfile $PIDFILE
 if [ $? = 0 ]; then
log_end_msg 0
else
SIGNAL=KILL
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
$PIDFILE
--retry=TERM/10/KILL/5

You need a --retry in the first start-stop-daemon call. It seems
that $? = 0, but the daemon is STILL RUNNING. SIGNAL=KILL and the
second --retry is not reached. For this reason the start of the daemon
shows [OK]. But the daemon is not started. In the meantime it is
stopped... Horrible.

Tested with Ubuntu 14.04 beta.

Mit freundlichen Grüßen / Best regards

Gregor Fischer

Prisma Computer GmbH
Sternallee 89  -  68723 Schwetzingen
Fon 0 62 02.5 75 68 10
Fax 0 62 02.5 75 68 75
eMail: g.fisc...@prisma-computer.de
Internet: www.prisma-computer.de

Geschäftsführung: Gerald Wilkens, Bernhard Goebel
Amtsgericht Mannheim HRB 420986 S
USt-IdNr.: DE 144 278 153

Am 11.04.2014 15:40, schrieb Francesco P. Lovergine:
 On Mon, Apr 07, 2014 at 12:33:01PM +0200, Prisma Computer - G. Fischer wrote:
 Hello,

 I'm able to confirm this bug with ProFTPD Version 1.3.5rc3. This is an
 evil bug, leading to logrotate is killing proftpd. When is it expected
 to be fixed?

 Mit freundlichen Grüßen / Best regards

 Gregor Fischer

 start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
 $PIDFILE --retry=TERM/10/KILL/5
 
 This version is already using the sleeping thanks to the --retry flag. You are
 talking about what exactly? The next systemd will not appreciate sleeps
 around in init scripts, so this is the proper way of fixing that issue.
 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#721201: proftpd-basic: Without sleep 2, doing /etc/init.d/proftpd restart doesn't restart the daemon, but only stops it.

2014-04-07 Thread Prisma Computer - G. Fischer
Hello,

I'm able to confirm this bug with ProFTPD Version 1.3.5rc3. This is an
evil bug, leading to logrotate is killing proftpd. When is it expected
to be fixed?

Mit freundlichen Grüßen / Best regards

Gregor Fischer

Prisma Computer GmbH
Sternallee 89  -  68723 Schwetzingen
Fon 0 62 02.5 75 68 10
Fax 0 62 02.5 75 68 75
eMail: g.fisc...@prisma-computer.de
Internet: www.prisma-computer.de

Geschäftsführung: Gerald Wilkens, Bernhard Goebel
Amtsgericht Mannheim HRB 420986 S
USt-IdNr.: DE 144 278 153

Am 29.08.2013 02:01, schrieb Virgil Gheorghiu:
 Package: proftpd-basic
 Version: 1.3.5~rc3-2
 Severity: important
 
 Dear Maintainer,
 *** Please consider answering these questions, where appropriate ***
 
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
  ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
 
 *** End of the template - remove these lines ***
 
 
 -- System Information:
 Debian Release: 7.0
   APT prefers unstable
   APT policy: (500, 'unstable')
 Architecture: amd64 (x86_64)
 
 Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
 Shell: /bin/sh linked to /bin/dash
 
 Versions of packages proftpd-basic depends on:
 ii  adduser3.113+nmu3
 ii  debconf1.5.49
 ii  debianutils4.3.4
 ii  libacl12.2.51-8
 ii  libc6  2.17-92
 ii  libcap21:2.22-1.2
 ii  libmemcached10 1.0.8-1
 ii  libmemcachedutil2  1.0.8-1
 ii  libncurses55.9-10
 ii  libpam-runtime 1.1.3-7.1
 ii  libpam0g   1.1.3-7.1
 ii  libpcre3   1:8.31-2
 ii  libssl1.0.01.0.1e-1
 ii  libtinfo5  5.9-10
 ii  libwrap0   7.6.q-24
 ii  netbase5.0
 ii  sed4.2.1-10
 ii  ucf3.0025+nmu3
 ii  zlib1g 1:1.2.7.dfsg-13
 
 proftpd-basic recommends no packages.
 
 Versions of packages proftpd-basic suggests:
 pn  openbsd-inetd | inet-superserver  none
 ii  openssl   1.0.1c-4
 pn  proftpd-doc   none
 pn  proftpd-mod-geoip none
 ii  proftpd-mod-ldap  1.3.5~rc3-2
 pn  proftpd-mod-mysql none
 pn  proftpd-mod-odbc  none
 pn  proftpd-mod-pgsql none
 pn  proftpd-mod-sqlitenone
 
 -- Configuration Files:
 /etc/init.d/proftpd changed:
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 DAEMON=/usr/sbin/proftpd
 NAME=proftpd
 RUN=no
 OPTIONS=
 CONFIG_FILE=/etc/proftpd/proftpd.conf
 PIDFILE=`grep -i 'pidfile' $CONFIG_FILE|sed -e 's/pidfile[\t ]\+//i'`
 if [ x$PIDFILE = x ];
 then
   PIDFILE=/var/run/proftpd.pid
 fi
 [ -r /etc/default/proftpd ]  . /etc/default/proftpd
 trap  1
 trap  15
 test -f $DAEMON || exit 0
 . /lib/lsb/init-functions
 if ! egrep -qi ^[[:space:]]*ServerType.*standalone $CONFIG_FILE
 then
   if egrep -qi server[[:space:]]*=[[:space:]]*/usr/sbin/(in\.)?proftpd 
 /etc/xinetd.conf 2/dev/null || \
  egrep -qi server[[:space:]]*=[[:space:]]*/usr/sbin/(in\.)?proftpd 
 /etc/xinetd.d/* 2/dev/null || \
  egrep -qi ^ftp.*/usr/sbin/(in\.)?proftpd /etc/inetd.d/* 
 2/dev/null || \
  egrep -qi ^ftp.*/usr/sbin/(in\.)?proftpd /etc/inetd.conf 
 2/dev/null
   then
   RUN=no
   INETD=yes
   else
   if ! egrep -qi ^[[:space:]]*ServerType.*inetd $CONFIG_FILE
   then
   RUN=yes
   INETD=no
   else
   RUN=no
   INETD=no
   fi
   fi
 fi
 [ ! -d /var/run/proftpd ]  mkdir /var/run/proftpd
 inetd_check()
 {
   if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd -a \
! -x /usr/sbin/inetutils-inetd ]; then
   echo Neither inetd nor xinetd appears installed: check your 
 configuration.
   fi
 }
 start()
 {
 log_daemon_msg Starting ftp server $NAME
 start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo --exec 
 $DAEMON -- -c $CONFIG_FILE $OPTIONS  
 if [ $? != 0 ]; then
 log_end_msg 1
 exit 1
 else
 log_end_msg 0
 fi
 }
 signal()
 {
 if [ $1 = stop ]; then
   SIGNAL=TERM
   log_daemon_msg Stopping ftp server $NAME
 else
   if [ $1 = reload ]; then
   SIGNAL=HUP
   log_daemon_msg Reloading ftp server $NAME
   else
   echo ERR: wrong parameter given to signal()
   exit 1
   fi
 fi
 if [ -f $PIDFILE ]; then
   start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile $PIDFILE
if [ $? = 0 ]; then
   log_end_msg 0
   else
   SIGNAL=KILL
   start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
 $PIDFILE --retry=TERM/10/KILL/5
   if [ $? != 0 ]; then
   log_end_msg 1
   [ $2 != 0 ] || 

Bug#721201: proftpd-basic: Without sleep 2, doing /etc/init.d/proftpd restart doesn't restart the daemon, but only stops it.

2013-08-28 Thread Virgil Gheorghiu
Package: proftpd-basic
Version: 1.3.5~rc3-2
Severity: important

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these lines ***


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages proftpd-basic depends on:
ii  adduser3.113+nmu3
ii  debconf1.5.49
ii  debianutils4.3.4
ii  libacl12.2.51-8
ii  libc6  2.17-92
ii  libcap21:2.22-1.2
ii  libmemcached10 1.0.8-1
ii  libmemcachedutil2  1.0.8-1
ii  libncurses55.9-10
ii  libpam-runtime 1.1.3-7.1
ii  libpam0g   1.1.3-7.1
ii  libpcre3   1:8.31-2
ii  libssl1.0.01.0.1e-1
ii  libtinfo5  5.9-10
ii  libwrap0   7.6.q-24
ii  netbase5.0
ii  sed4.2.1-10
ii  ucf3.0025+nmu3
ii  zlib1g 1:1.2.7.dfsg-13

proftpd-basic recommends no packages.

Versions of packages proftpd-basic suggests:
pn  openbsd-inetd | inet-superserver  none
ii  openssl   1.0.1c-4
pn  proftpd-doc   none
pn  proftpd-mod-geoip none
ii  proftpd-mod-ldap  1.3.5~rc3-2
pn  proftpd-mod-mysql none
pn  proftpd-mod-odbc  none
pn  proftpd-mod-pgsql none
pn  proftpd-mod-sqlitenone

-- Configuration Files:
/etc/init.d/proftpd changed:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/proftpd
NAME=proftpd
RUN=no
OPTIONS=
CONFIG_FILE=/etc/proftpd/proftpd.conf
PIDFILE=`grep -i 'pidfile' $CONFIG_FILE|sed -e 's/pidfile[\t ]\+//i'`
if [ x$PIDFILE = x ];
then
PIDFILE=/var/run/proftpd.pid
fi
[ -r /etc/default/proftpd ]  . /etc/default/proftpd
trap  1
trap  15
test -f $DAEMON || exit 0
. /lib/lsb/init-functions
if ! egrep -qi ^[[:space:]]*ServerType.*standalone $CONFIG_FILE
then
if egrep -qi server[[:space:]]*=[[:space:]]*/usr/sbin/(in\.)?proftpd 
/etc/xinetd.conf 2/dev/null || \
   egrep -qi server[[:space:]]*=[[:space:]]*/usr/sbin/(in\.)?proftpd 
/etc/xinetd.d/* 2/dev/null || \
   egrep -qi ^ftp.*/usr/sbin/(in\.)?proftpd /etc/inetd.d/* 
2/dev/null || \
   egrep -qi ^ftp.*/usr/sbin/(in\.)?proftpd /etc/inetd.conf 
2/dev/null
then
RUN=no
INETD=yes
else
if ! egrep -qi ^[[:space:]]*ServerType.*inetd $CONFIG_FILE
then
RUN=yes
INETD=no
else
RUN=no
INETD=no
fi
fi
fi
[ ! -d /var/run/proftpd ]  mkdir /var/run/proftpd
inetd_check()
{
if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd -a \
 ! -x /usr/sbin/inetutils-inetd ]; then
echo Neither inetd nor xinetd appears installed: check your 
configuration.
fi
}
start()
{
log_daemon_msg Starting ftp server $NAME
start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo --exec 
$DAEMON -- -c $CONFIG_FILE $OPTIONS  
if [ $? != 0 ]; then
log_end_msg 1
exit 1
else
log_end_msg 0
fi
}
signal()
{
if [ $1 = stop ]; then
SIGNAL=TERM
log_daemon_msg Stopping ftp server $NAME
else
if [ $1 = reload ]; then
SIGNAL=HUP
log_daemon_msg Reloading ftp server $NAME
else
echo ERR: wrong parameter given to signal()
exit 1
fi
fi
if [ -f $PIDFILE ]; then
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile $PIDFILE
 if [ $? = 0 ]; then
log_end_msg 0
else
SIGNAL=KILL
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
$PIDFILE --retry=TERM/10/KILL/5
if [ $? != 0 ]; then
log_end_msg 1
[ $2 != 0 ] || exit 0
else
log_end_msg 0
fi
fi
if [ $SIGNAL = KILL ]; then
rm -f $PIDFILE
fi
else
log_end_msg 0
fi
}
case $1 in
start)
if [ x$RUN = xyes ] ; then
start
else
if [ x$INETD = xyes ] ; then
echo ProFTPD is started from inetd/xinetd.
inetd_check
else 
echo ProFTPD warning: cannot start neither in standalone nor 
in inetd/xinetd mode. Check your configuration.
fi
fi
;;