[Pkg-nagios-devel] Bug#476466: a rough patch for this issue

Stephen Gran sgran at debian.org
Mon Apr 28 13:36:43 UTC 2008


This one time, at band camp, Marc Haber said:
> On Mon, Apr 28, 2008 at 12:22:13PM +0100, Stephen Gran wrote:
> > --- debian/nagios2-common.nagios2.init.old      2008-04-28 12:05:21.000000000 +0100
> > +++ debian/nagios2-common.nagios2.init  2008-04-28 12:13:13.000000000 +0100
> > @@ -146,6 +146,20 @@
> >  stop () {
> >      killproc -p "$THEPIDFILE" "$DAEMON"
> >      ret=$?
> > +    if [ `pidof nagios2 | wc -l ` -gt 0 ]; then
> > +        echo -n "Waiting for nagios to die.."
> > +        cnt=0
> > +        while [ `pidof nagios2 | wc -l ` -gt 0 ]; do
> > +            cnt=`expr "$cnt" + 1`
> > +            if [ "$cnt" -gt 15 ]; then
> > +                kill -9 `pidof nagios2`
> > +                break
> > +            fi
> > +            sleep 1
> > +            echo -n "."
> > +        done
> > +    fi
> > +    echo
> >      if ! check_named_pipe; then
> >        rm -f $nagiospipe
> >      fi
> 
> I have seen code like this far too often, we need a centralized
> solution for that.

Ideally, the lsb init library was supposed to do this sort of thing.
Since it clearly hasn't, I'm just asking that you guys fix your corner
of the archive until someone comes up with a centralized library that
does what we want.  I realize that's not ideal, but I don't think
letting the perfect be the enemy of the good helps all that much,
either.
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20080428/f3e6e10c/attachment.pgp 


More information about the Pkg-nagios-devel mailing list