Hi guys.
I thought this may be useful as config files can get quite big.
this lets you split the file into sections and makes it easier to manage IMHO
regards Ian --- mon-0.99.3-35/mon Wed Oct 1 01:54:04 2003 +++ mon/mon Thu Oct 23 09:58:33 2003 @@ -242,7 +244,7 @@ init_globals(); init_cf_globals();
-syslog_die ("config file $CF{CF} does not exist") if (! -f $CF{"CF"});
+syslog_die ("config file $CF{CF} does not exist") if (! -f $CF{"CF"} and ! -d $CF{"CF"} );
# # read config file @@ -769,7 +771,12 @@ # # parse configuration file # - if ($opt{"M"} || $CF =~ /\.m4$/) + if ( -d $CF ) + { + return "could not open directory of cf : $CF: $!" + if (!open (CFG, "cat $CF/*.cf |")); + } + elsif ($opt{"M"} || $CF =~ /\.m4$/) { return "could not open m4 pipe of cf file: $CF: $!" if (!open (CFG, "m4 $CF |"));
_______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon