diff options
author | Darren Embry <dse@webonastick.com> | 2012-05-17 15:22:29 -0400 |
---|---|---|
committer | Darren Embry <dse@webonastick.com> | 2012-05-17 15:22:29 -0400 |
commit | 5d51f00ec70fa371eb6d59d8b2e4ef287e804fd1 (patch) | |
tree | 1c93784542a89fdccd2d7fd7d72c61465edf9c83 /etc/inc/rrd.inc | |
parent | 0887774669e272c1a0825af4548ac7edb445e40a (diff) | |
download | pfsense-5d51f00ec70fa371eb6d59d8b2e4ef287e804fd1.zip pfsense-5d51f00ec70fa371eb6d59d8b2e4ef287e804fd1.tar.gz |
log_error if rrdtool restore calls fail
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index b2d4e94..4c218a7 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -69,7 +69,13 @@ function restore_rrd() { if (file_exists("{$rrd_file}")) { unlink($rrd_file); } - exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'"); + $output = array(); + $status = null; + exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'", $output, $status); + if ($status) { + log_error("rrdtool restore -f '{$xml_file}' '{$rrd_file}' failed returning {$status}."); + continue; + } unlink($xml_file); } return true; |