Pierre Bauduin wrote:
[]
> The following component of Big Brother does *not* work:
> - disk: monitoring of free disk space
> 
> The Big Brother page about disks is always red and says:
> "red Mon Dec 31 16:00:00 CET 2007 - Filesystem of /Users/bb/bbclient/tmp 
> is FULL"

After a quick look at the BB sources (I know nothing whatsoever about 
BB!), it seems to me that this is a syntax problem with the 'sort' 
command. Have a look at the script
bin/bb-disk.sh

It has a line

eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT 
\"+${DFSORT}\" > $BBTMP/DFOUT.$$"

which translates into

df | egrep "^/dev" | egrep -v "cdrom" |sort "+4" > 
/Users/bb/bbclient/tmp/DFOUT.$$

So it writes a list of your /dev filesystems except cdroms, sorted by 
capacity, into that tmp file /Users/bb/bbclient/tmp/DFOUT.$$.

Afterwards, it makes various checks on that file. In particular when it 
finds that the file exists, but has zero length, it tells you that the 
filesystem is FULL.

Now 'sort +4' is an old syntax that Leopard's sort does not understand 
any more. Therefore the file in question gets created, but nothing is 
written into it. Instead there will be an error message
   "sort: open failed: +4: No such file or directory",
but this error message is probably dropped on the floor. Since the file 
is empty, you get your red flag.

The fix is easy: Replace the field

   \"+${DFSORT}\"

in the above command line in bin/bb-disk.sh by

   \"-k$(($DFSORT+1))\"

or, less fancy but equivalent, by

   \"-k5\"

There is another place in the same script where you need to do the same 
patching.

-- 
Martin


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to