[Pkg-sysvinit-devel] Bug#825870: sysvinit-utils: Second stop command does not use process matchers name and pidfile
Steven Roose
stevenroose at gmail.com
Tue May 31 15:45:45 UTC 2016
Ah, now I see the rm -f $PIDFILE haha. So yeah you're right.
On May 31, 2016 17:40, "Andreas Henriksson" <andreas at fatal.se> wrote:
> Hello Steven Roose.
>
> On Tue, May 31, 2016 at 02:15:10AM +0200, Steven Roose wrote:
> [...]
> > The daemon does not make it's own pidfile, so I added following relevant
> variables:
> > PIDFILE=/pidfile
> > START_ARGS=" --make-pidfile"
> > STOP_ARGS=" --remove-pidfile"
> [...]
> > --- a/debian/init-d-script
> > +++ b/debian/init-d-script
> > @@ -95,7 +95,7 @@ do_stop_cmd() {
> > # sleep for some time.
> > start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 \
> > $STOP_ARGS \
> > - --exec $DAEMON
> > + ${PIDFILE:+--pidfile ${PIDFILE}} --name $NAME --exec $DAEMON
> > [ "$?" = 2 ] && return 2
> > # Many daemons don't delete their pidfiles when they exit.
> > rm -f $PIDFILE
> [...]
>
> While I think your patch looks good please note that there's no
> point in using STOP_ARGS=" --remove-pidfile" given the last quoted
> line above which will unconditionally remove any pidfile.
>
> The workaround for your issue is thus very simple. Just drop
> STOP_ARGS=" --remove-pidfile"
>
> Hope this helps.
>
> Regards,
> Andreas Henriksson
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20160531/941b999e/attachment-0001.html>
More information about the Pkg-sysvinit-devel
mailing list