Revision 6c07db48
Added by Phil Davis about 10 years ago
etc/inc/system.inc | ||
---|---|---|
331 | 331 |
$dnsmasqcfg = $config['dnsmasq']; |
332 | 332 |
} |
333 | 333 |
|
334 |
$hosts = "127.0.0.1 localhost localhost.{$syscfg['domain']}\n";
|
|
334 |
$hosts = "127.0.0.1 localhost localhost.{$syscfg['domain']}\n"; |
|
335 | 335 |
$hosts .= "::1 localhost localhost.{$syscfg['domain']}\n"; |
336 | 336 |
$lhosts = ""; |
337 | 337 |
$dhosts = ""; |
... | ... | |
782 | 782 |
// Rather than repeatedly use the same code, use this function to build a list of remote servers. |
783 | 783 |
$facility .= " ". |
784 | 784 |
$remote_servers = ""; |
785 |
$pad_to = 56;
|
|
785 |
$pad_to = 56; |
|
786 | 786 |
$padding = ceil(($pad_to - strlen($facility))/8)+1; |
787 | 787 |
if ($syslogcfg['remoteserver']) { |
788 | 788 |
$remote_servers .= "{$facility}" . str_repeat("\t", $padding) . "@" . system_syslogd_fixup_server($syslogcfg['remoteserver']) . "\n"; |
... | ... | |
1106 | 1106 |
if (!$config['system']['webgui']['port']) { |
1107 | 1107 |
$portarg = "443"; |
1108 | 1108 |
} |
1109 |
$ca = ca_chain($cert);
|
|
1109 |
$ca = ca_chain($cert); |
|
1110 | 1110 |
} |
1111 | 1111 |
|
1112 | 1112 |
/* generate lighttpd configuration */ |
... | ... | |
1157 | 1157 |
echo "system_generate_lighty_config() being called $mt\n"; |
1158 | 1158 |
} |
1159 | 1159 |
|
1160 |
if ($captive_portal !== false) {
|
|
1160 |
if ($captive_portal !== false) { |
|
1161 | 1161 |
$captiveportal = ",\"mod_rewrite\",\"mod_evasive\""; |
1162 | 1162 |
$captive_portal_rewrite = "url.rewrite-once = ( \"(.*captiveportal.*)\" => \"$1\", \"(.*)\" => \"/index.php?zone={$captive_portal}&redirurl=$1\" )\n"; |
1163 | 1163 |
|
... | ... | |
1199 | 1199 |
} |
1200 | 1200 |
|
1201 | 1201 |
// Ramp up captive portal max procs, assuming each PHP process can consume up to 64MB RAM |
1202 |
if ($captive_portal !== false) {
|
|
1202 |
if ($captive_portal !== false) { |
|
1203 | 1203 |
if ($realmem > 135 and $realmem < 256) { |
1204 | 1204 |
$max_procs += 1; // 2 worker processes |
1205 | 1205 |
} else if ($realmem > 255 and $realmem < 513) { |
Also available in: Unified diff
Code spacing
and other random stuff I noticed.
I think this finishes messing with code style. The codebase should match
the developer style guide closely enough that 99.9% of changes will not
feel the need to also massage the formatting.