summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/rrd.inc
diff options
context:
space:
mode:
authorDenny Page <dennypage@me.com>2016-02-19 12:16:13 -0800
committerDenny Page <dennypage@me.com>2016-02-19 12:16:13 -0800
commit31a1aa3c1c8a069d52b09e457867ea957b0f1933 (patch)
tree5469bd0b785678690f60fcdbb07c12cb3ead76ad /src/etc/inc/rrd.inc
parentd4871a15a8fd96632aff189529b0268fd816792e (diff)
parent2ccf2ede9e8fdfd236b221d9d19464dd8975e682 (diff)
downloadpfsense-31a1aa3c1c8a069d52b09e457867ea957b0f1933.zip
pfsense-31a1aa3c1c8a069d52b09e457867ea957b0f1933.tar.gz
Merge branch 'master' of https://github.com/pfsense/pfsense
Diffstat (limited to 'src/etc/inc/rrd.inc')
-rw-r--r--src/etc/inc/rrd.inc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc
index 45b03a1..690f6cb 100644
--- a/src/etc/inc/rrd.inc
+++ b/src/etc/inc/rrd.inc
@@ -98,7 +98,7 @@ function restore_rrd() {
unset($rrdrestore);
$_gb = exec("cd /;LANG=C /usr/bin/tar -tf {$g['cf_conf_path']}/rrd.tgz", $rrdrestore, $rrdreturn);
if ($rrdreturn != 0) {
- log_error("RRD restore failed exited with $rrdreturn, the error is: $rrdrestore\n");
+ log_error(sprintf(gettext('RRD restore failed exited with %1$s, the error is: %2$s'), $rrdreturn, $rrdrestore));
return;
}
foreach ($rrdrestore as $xml_file) {
@@ -109,12 +109,12 @@ function restore_rrd() {
file_put_contents("{$g['tmp_path']}/rrd_restore", $xml_file);
$_gb = exec("cd /;LANG=C /usr/bin/tar -xf {$g['cf_conf_path']}/rrd.tgz -T {$g['tmp_path']}/rrd_restore");
if (!file_exists("/{$xml_file}")) {
- log_error("Could not extract {$xml_file} RRD xml file from archive!");
+ log_error(sprintf(gettext("Could not extract %s RRD xml file from archive!"), $xml_file));
continue;
}
$_gb = exec("$rrdtool restore -f '/{$xml_file}' '{$rrd_file}'", $output, $status);
if ($status) {
- log_error("rrdtool restore -f '{$xml_file}' '{$rrd_file}' failed returning {$status}.");
+ log_error(sprintf(gettext("rrdtool restore -f '%1\$s' '%2\$s' failed returning %3\$s."), $xml_file, $rrd_file, $status));
continue;
}
unset($output);
@@ -512,17 +512,17 @@ function enable_rrd_graphing() {
switch ($altq->GetBwscale()) {
case "Gb":
$factor = 1024 * 1024 * 1024;
- break;
+ break;
case "Mb":
- $factor = 1024 * 1024;
- break;
+ $factor = 1024 * 1024;
+ break;
case "Kb":
- $factor = 1024;
- break;
+ $factor = 1024;
+ break;
case "b":
default:
- $factor = 1;
- break;
+ $factor = 1;
+ break;
}
$qbandwidth = $altq->GetBandwidth() * $factor;
if ($qbandwidth <= 0) {
OpenPOWER on IntegriCloud