Jack Howarth wrote:
[]
> ps For some reason 'fink update-all' now seems to honor the
> test. Strange. I would be interested to know if this test
> fails for anyone else who has NAV 10 installed.

I can't help with NAV, but here is a guess about a possible cause:

The ccp4 package description has the test

  if [[ $(ps axww | grep NortonAutoProtect | wc -l) -gt 1 ]] ;

As I understand it, the idea is that when you grep the output of ps 
axww, you should see at least the line with the grep processs itself, so 
that when the processs in question is running, you get at least 2 lines 
of output. Now I see that the grep process is not always detected. I 
have before my eyes, for example, the following output:

[abook:]costabel% ps axww |grep iTunesHelper
   324  ??  S      0:00.54 
/Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/MacOS/iTunesHelper
 
-psn_0_1441793
[abook:]costabel% ps auxww | grep iTunesHelper
costabel   324   0.0  0.5    94336   3016  ??  S    Sat06PM   0:00.54 
/Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/MacOS/iTunesHelper
 
-psn_0_1441793
costabel  3793   0.0  0.0     8784      8  p3  R+    8:06AM   0:00.00 
grep iTunes
[abook:]costabel%

You see that the first time, only one line was printed, whereas the 
second time, 2 lines were printed. So this version of the test seems to 
be unstable (no idea why, but Apple's /usr/bin/ps behaves erratically 
like this).

It would be more stable to replace the test by the more traditional

   if [[ $(ps axww | grep NortonAutoProtect | grep -v grep | wc -l) -gt 
0 ]] ;

which removes the grep process when it is present, or equivalently and 
shorter

   if ps axww | grep NortonAutoProtect | grep -v grep >/dev/null ;

-- 
Martin







-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to