[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]


     dependencies layout

this is a followup to my previous email regarding this; please read my
first before this, to understand how all this works.

I had a good idea for a dependencies layout; take the 'variable' variable
and the 'sitename' variable, and make that the reference point for the
dependancy, then tack that onto the end of the 'variable' variable
separated with a ^A, this way all homebrew nocol scripts, and other nocol
scripts that don't implement dependencies, or don't want to will not be

Then parse this in the nocol code, and by the reference point you can find
the status of each object.  Optionally, you can have a subroutine that
will loop itself down the list of dependencies to insure that none down
the road are cut off, without the direct dependancy being down (even
though if all works properly its direct dependancy SHOULD be down).

Something like this (only in C since it's going into netconsole)...

sub check {
  my($object) = $_[0];
  if ($status{$object} <1) { $MARKDEPENDANCY = 1; }
  my($var, $dep) = split(/\001/, $varname{$object});
  if ($dep ne "") { 
    my($newobj) = &findobject($dep);

and if MARKDEPENDANCY == 1, you know not to display the current item, as
one of the dependencies is cut off down the line.

It may also be a good idea to have a fifth severity level (level 0?) to
display both critical, AND hidden items.

Thank you,

Jonathan A. Zdziarski
Senior Systems Administrator
Netrail, Inc.
888.NET.RAIL x242