Changeset 3432
- Timestamp:
- 03/17/10 09:01:30 (2 years ago)
- Files:
-
- trunk/master/lib/Munin/Master/GraphOld.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/master/lib/Munin/Master/GraphOld.pm
r3421 r3432 43 43 @ISA = qw(Exporter); 44 44 @EXPORT = qw(graph_startup graph_check_cron graph_main); 45 46 use Clone qw(clone); 45 47 46 48 use IO::Socket; … … 163 165 # "global" Configuration hash 164 166 my $config; 167 my $config_bak; 165 168 166 169 # stats file handle … … 251 254 # Only read $config once (thx Jani M.) 252 255 # TODO - should maybe stat() the conf file to dyna reload the conf 253 $config = &munin_config($conffile) if ! $config; 256 if (! $config) { 257 $config = &munin_config($conffile); 258 $config_bak = clone($config); 259 } else { 260 undef_references($config); 261 $config = clone($config_bak); 262 } 254 263 255 264 # untaint the $log_file variable … … 287 296 } 288 297 298 sub undef_references { 299 my ($c) = @_; 300 foreach my $k (keys %$c) { 301 undef_references($c->{$k}) if (ref($c->{$k}) eq "HASH" && $k ne "#%#parent"); 302 $c->{$k} = undef; 303 } 304 } 289 305 290 306 sub graph_check_cron {
