On 5 Jun 2016 at 7:57, Tom Eastep wrote:

> On 05/29/2016 02:00 AM, Matt Darfeuille wrote:
> 
> Hi Matt,
> 
> > 
> > -------------- Enclosure number 1 ----------------
> >>From 6ff651108df33ab8be4562caef03a8582e9eac5e Mon Sep 17 00:00:00 2001
> > From: Matt Darfeuille <[email protected]>
> > Date: Tue, 24 May 2016 13:10:28 +0200
> > Subject: [PATCH 1/8] Emulate 'ps -p' using grep to work on openwrt
> > 
> > Signed-off-by: Matt Darfeuille <[email protected]>
> > ---
> >  Shorewall-core/lib.common | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Shorewall-core/lib.common b/Shorewall-core/lib.common
> > index 03ecb2a..fcb02ee 100644
> > --- a/Shorewall-core/lib.common
> > +++ b/Shorewall-core/lib.common
> > @@ -776,7 +776,7 @@ mutex_on()
> >             error_message "WARNING: Stale lockfile ${lockf} removed"
> >         elif [ $lockpid -eq $$ ]; then
> >                  return 0
> > -       elif ! qt ps p ${lockpid}; then
> > +       elif ! qt ps | grep -v grep | grep ${lockpid}; then
> 
> I don't see how this can work -- 'qt ps' will produce no output yet the
> code pipes into tandem greps.
> 
> Do you really want this instead?
> 
> elif ! ps | grep -v grep | qt grep ${lockpid}; then
> 

Oops sorry Tom, that's what I meant(do you want the corrected 
patch?)!

Do you have a better way to do it?

> >             rm -f ${lockf}
> >             error_message "WARNING: Stale lockfile ${lockf} from pid 
> > ${lockpid} removed"
> >         fi
> > 
> 
> 

-Matt

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to