summaryrefslogtreecommitdiffstats
path: root/etc/inc/rrd.inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-26 13:10:01 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-26 13:10:01 +0100
commit285ef132f7d671620f269a57d2ebcff585d2a493 (patch)
treeb491fad66d22765d9640b2ac543c41b6e417a95d /etc/inc/rrd.inc
parent32e834ffd3b4cc6cdc6b147c91cb6dbcb0a93288 (diff)
downloadpfsense-285ef132f7d671620f269a57d2ebcff585d2a493.zip
pfsense-285ef132f7d671620f269a57d2ebcff585d2a493.tar.gz
Rather than set the g['booting'] on globals provide a function to test for that doing the right checks
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r--etc/inc/rrd.inc34
1 files changed, 17 insertions, 17 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc
index 6e64815..a5742e3 100644
--- a/etc/inc/rrd.inc
+++ b/etc/inc/rrd.inc
@@ -200,7 +200,7 @@ function migrate_rrd_format($rrdoldxml, $rrdnewxml) {
function enable_rrd_graphing() {
global $config, $g, $altq_list_queues;
- if($g['booting'])
+ if(platform_booting())
echo gettext("Generating RRD graphs...");
$rrddbpath = "/var/db/rrd/";
@@ -282,7 +282,7 @@ function enable_rrd_graphing() {
}
chown($rrddbpath, "nobody");
- if ($g['booting']) {
+ if (platform_booting()) {
restore_rrd();
}
@@ -338,7 +338,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$traffic N:U:U:U:U:U:U:U:U");
}
@@ -371,7 +371,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$packets N:U:U:U:U:U:U:U:U");
}
@@ -400,7 +400,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$wireless N:U:U:U");
}
@@ -425,7 +425,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$vpnusers N:U");
}
@@ -507,7 +507,7 @@ function enable_rrd_graphing() {
unset($rrdcreate);
}
- if($g['booting']) {
+ if(platform_booting()) {
$rrdqcommand = "-t ";
$rrducommand = "N";
$qi = 0;
@@ -575,7 +575,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$cellular N:U:U:U");
}
@@ -609,7 +609,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$states N:U:U:U:U:U");
}
@@ -644,7 +644,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$proc N:U:U:U:U:U");
}
@@ -682,7 +682,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$mem N:U:U:U:U:U");
}
@@ -719,7 +719,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ifname$mbuf N:U:U:U:U");
}
@@ -796,7 +796,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $concurrent_filename N:U");
}
@@ -832,7 +832,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $loggedin_filename N:U");
}
@@ -875,7 +875,7 @@ function enable_rrd_graphing() {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrddbpath$ntpd N:U:U:U:U:U:U");
}
@@ -922,7 +922,7 @@ function enable_rrd_graphing() {
chown($database, "nobody");
}
- if($g['booting'])
+ if(platform_booting())
echo gettext("done.") . "\n";
}
@@ -949,7 +949,7 @@ function create_gateway_quality_rrd($rrd_file) {
}
/* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if($g['booting']) {
+ if(platform_booting()) {
mwexec("$rrdtool update $rrd_file N:U:U");
}
unset($rrdtool, $rrdinterval, $valid, $rrd_file);
OpenPOWER on IntegriCloud