Changeset 3411

Show
Ignore:
Timestamp:
03/10/10 22:56:21 (2 years ago)
Author:
steve.schnepp
Message:

- only unlink the graph file if present, otherwise it dies

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/master/_bin/munin-cgi-graph.in

    r3409 r3411  
    291291    my $logfile = shift; 
    292292 
    293     # remove old file 
    294     unlink($filename) or die("cannot remove old graph file: $!"); 
     293    # remove old file if present 
     294    if (-f $filename) { 
     295        unlink($filename) or die("cannot remove old graph file: $!"); 
     296    } 
    295297 
    296298    $serv =~ s{[^\w_\/"'\[\]\(\)+=-]}{_}g; $serv =~ /^(.+)$/; $serv = $1; #"