summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc2
-rw-r--r--etc/inc/system.inc6
-rw-r--r--etc/inc/upgrade_config.inc20
3 files changed, 9 insertions, 19 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index a9f9658..ecf059a 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1972,7 +1972,7 @@ function filter_generate_user_rule($rule) {
$type = $rule['type'];
if($type != "pass" && $type != "block" && $type != "reject" && $type != "match") {
/* default (for older rules) is pass */
- $type = "pass ";
+ $type = "pass";
}
if($type == "reject") {
$aline['type'] = "block return ";
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index f01d674..7790d38 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -856,7 +856,7 @@ function system_generate_lighty_config($filename,
if($captive_portal == true) {
$bin_environment = <<<EOC
"bin-environment" => (
- "PHP_FCGI_CHILDREN" => "$max_procs",
+ "PHP_FCGI_CHILDREN" => "0",
"PHP_FCGI_MAX_REQUESTS" => "500"
),
EOC;
@@ -864,7 +864,7 @@ EOC;
} else if ($avail > 0 and $avail < 128) {
$bin_environment = <<<EOC
"bin-environment" => (
- "PHP_FCGI_CHILDREN" => "$max_procs",
+ "PHP_FCGI_CHILDREN" => "0",
"PHP_FCGI_MAX_REQUESTS" => "2",
),
@@ -872,7 +872,7 @@ EOC;
} else
$bin_environment = <<<EOC
"bin-environment" => (
- "PHP_FCGI_CHILDREN" => "$max_procs",
+ "PHP_FCGI_CHILDREN" => "0",
"PHP_FCGI_MAX_REQUESTS" => "500"
),
EOC;
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 6dd276d..1e12de4 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -2041,12 +2041,10 @@ function upgrade_054_to_055() {
$i++;
}
- $rrdxml = dump_xml_config_raw($rrdold, "rrd");
- file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", $rrdxml);
+ file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", dump_xml_config_raw($rrdold, "rrd"));
mwexec("$rrdtool restore -f {$g['tmp_path']}/{$xmldumpnew} {$rrddbpath}/{$database} 2>&1");
unset($rrdold);
- unset($rrdxmlarray);
}
/* let apinger recreate required files */
setup_gateways_monitor();
@@ -2100,9 +2098,7 @@ function upgrade_054_to_055() {
$i++;
}
- $rrdxmlarray = migrate_rrd_format($rrdold, $rrdnew);
- $rrdxml = dump_xml_config_raw($rrdxmlarray, "rrd");
- file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", $rrdxml);
+ file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", dump_xml_config_raw(migrate_rrd_format($rrdold, $rrdnew), "rrd"));
mwexec("$rrdtool restore -f {$g['tmp_path']}/{$xmldumpnew} {$rrddbpath}/{$database} 2>&1");
/* we now have the rrd with the new fields, adjust the size now. */
/* RRA 2 is 60 minutes, RRA 3 is 720 minutes */
@@ -2110,8 +2106,6 @@ function upgrade_054_to_055() {
mwexec("$rrdtool resize {$rrddbpath}/{$database} 2 GROW 2000;/bin/mv resize.rrd {$rrddbpath}/{$database} 2>&1");
mwexec("/bin/sync");
mwexec("$rrdtool resize {$rrddbpath}/{$database} 3 GROW 2000;/bin/mv resize.rrd {$rrddbpath}/{$database} 2>&1");
- unset($rrdold);
- unset($rrdnew);
unset($rrdxmlarray);
}
enable_rrd_graphing();
@@ -2690,12 +2684,10 @@ function upgrade_080_to_081() {
/* create temporary xml from new RRD */
dump_rrd_to_xml("{$g['tmp_path']}/{$databasetmp}", "{$g['tmp_path']}/{$xmldumptmp}");
- $rrdoldxml = file_get_contents("{$g['tmp_path']}/{$xmldump}");
- $rrdold = xml2array($rrdoldxml, 1, "tag");
+ $rrdold = xml2array(file_get_contents("{$g['tmp_path']}/{$xmldump}"), 1, "tag");
$rrdold = $rrdold['rrd'];
- $rrdnewxml = file_get_contents("{$g['tmp_path']}/{$xmldumptmp}");
- $rrdnew = xml2array($rrdnewxml, 1, "tag");
+ $rrdnew = xml2array(file_get_contents("{$g['tmp_path']}/{$xmldumptmp}"), 1, "tag");
$rrdnew = $rrdnew['rrd'];
/* remove any MAX RRA's. Not needed for traffic. */
@@ -2707,9 +2699,7 @@ function upgrade_080_to_081() {
$i++;
}
- $rrdxmlarray = migrate_rrd_format($rrdold, $rrdnew);
- $rrdxml = dump_xml_config_raw($rrdxmlarray, "rrd");
- file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", $rrdxml);
+ file_put_contents("{$g['tmp_path']}/{$xmldumpnew}", dump_xml_config_raw(migrate_rrd_format($rrdold, $rrdnew), "rrd"));
mwexec("$rrdtool restore -f {$g['tmp_path']}/{$xmldumpnew} {$rrddbpath}/{$database} 2>&1");
}
OpenPOWER on IntegriCloud