Hi On Thu, Mar 09, 2006 at 01:07:12AM +0100, Javier Fernández-Sanguino Peña wrote: > On Wed, Mar 08, 2006 at 10:25:11PM +0100, Ola Lundqvist wrote: > > Hi > > Hi. > > > > - don't reload if the daemon is down > > > > Do it start instead then? > > No, reload should just reload the daemon. If it's down it should do nothing > (i.e. it does not make sense to 'reload' a daemon which is not active.
Personally I disagree as you do a reload when you think it is up, and then you most probably want it to start if it is not. > > > - I've also changed the 'ps' checks with multiple pipes to use pidof, > > > this is > > > typically faster, although with the caveat that no some very fast systems > > > this might leat to a race condition (pidof returns while the process is > > > still > > > stopping and killing children) so a double check (waiting a second) is > > > done > > > just in case. > > > > Is that faster then? > > Should be for most systems, for fast systems it might be slightly slower (1 > second slower). Pidof is faster than 'ps -ef |grep | ....'. However the race > condition whould eventually appear (even if using ps -ef) in *very* fast > systems since the death of ntop's children is done on the "background" > > > I'll also incorporate the changes to upstream as I realize that this init > > script > > is general enough for other distributions as well. > > I believe ntop already provides one for RedHat (in packages/RedHat/ntop.init) > and Mandrake. Probably so. Regards, // Ola > Regards > > Javier > -- --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering ---- / [EMAIL PROTECTED] Annebergsslingan 37 \ | [EMAIL PROTECTED] 654 65 KARLSTAD | | http://www.opal.dhs.org Mobile: +46 (0)70-332 1551 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]