diff options
author | Niko Tyni <ntyni@iki.fi> | 2005-09-04 13:40:42 +0200 |
---|---|---|
committer | Niko Tyni <ntyni@iki.fi> | 2005-09-04 13:40:42 +0200 |
commit | 0fb4bc74b24ea96e80d4e27428b8c2451fbf0eb5 (patch) | |
tree | 129599b69e7323fb6500336e0baaffcf55335bea | |
parent | 3946df708ae20686c8453eb55be934103daf2f7e (diff) | |
download | smokeping-0fb4bc74b24ea96e80d4e27428b8c2451fbf0eb5.tar.gz smokeping-0fb4bc74b24ea96e80d4e27428b8c2451fbf0eb5.tar.xz |
* lib/Smokeping.pm,
CHANGES:
+ don't create directories in "datadir" when running as a CGI
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | lib/Smokeping.pm | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -1,3 +1,5 @@ +* don't create directories in "datadir" when running as a CGI + -- niko * the DYNAMIC-related files (.adr and .snmp) can now be located outside "datadir" by specifying the new configuration variable "dyndir" -- niko, suggested by Marc Haber <mh+smokeping-users *zugschlus.de> diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index a14699f..28923e7 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -363,7 +363,7 @@ sub init_target_tree ($$$$) { foreach my $prop (keys %{$tree}) { if (ref $tree->{$prop} eq 'HASH'){ - if (not -d $name) { + if (not -d $name and not $cgimode) { mkdir $name, 0755 or die "ERROR: mkdir $name: $!\n"; }; init_target_tree $cfg, $probes, $tree->{$prop}, "$name/$prop"; |