From: Epp, M. Mr C. U. U. <mat...@us...> - 2008-04-22 20:29:18
|
I've created a small modification that causes devmon to obey the BBLOCATION identifier. It should now simply skip any entries in your bb-hosts that aren't set to that server's network. Let me know if there are any bugs in this. I haven't seen any yet on my own systems. Make these changes in the modules directory: -------------------------------------------- $diff dm_config.pm.orig dm_config.pm.new 56a57 > 'bbnet' => '', 123a125,128 > 'bbconf' => { 'default' => '/home/hobbit/server/etc/hobbitserver.cfg', > 'regex' => '.+', > 'set' => 0, > 'case' => 1 }, 127a133,136 > 'bbnet' => { 'default' => '', > 'regex' => '\w+', > 'set' => 0, > 'case' => 1 }, 240a250,259 > # Read the BBLOCATION from the hobbitserver.cfg file > open(CONFFILE, "$g{'bbconf'}") || do_log("Error opening conf file $g{'bbconf'}.\n"); > while(<CONFFILE>) { > if (/^BBLOCATION\=\"(.+)\"/) { > print "NET is $1\n"; > $g{'bbnet'} = $1; > } > } > close (CONFFILE); > 865d883 < 1269a1288,1293 > # Skip if the NET tag does not match this site > unless($bbopts =~ /NET:$g{'bbnet'}/) { > do_log("The NET for $host is not $g{'bbnet'}. Skipping.",0); > next; > } > --------------------------------------- And add this section to your devmon.cfg file: --------------------------------------- # BBSERVERCONF: Location of the hobbitserver.cfg file. We use this to read in # the BBLOCATION variable so we can ignore tests not meant for this site. # (case sensitive) [DEFAULT: /home/hobbit/server/etc/hobbitserver.cfg] BBCONF=/home/hobbit/server/etc/hobbitserver.cfg --------------------------------------- |