summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-19 10:58:06 -0400
committerjim-p <jimp@pfsense.org>2011-06-19 10:58:06 -0400
commit248501cd9d4d4370a95ec1f6f679afa3c26bea52 (patch)
tree9f43b7981523041e5b4b33d913084c8f41682a42 /etc
parent3df8786bfd712c2d553b690f75680f1a12129a60 (diff)
parentdd4bded7de6d6654afe2cf203df3136c1bef9515 (diff)
downloadpfsense-248501cd9d4d4370a95ec1f6f679afa3c26bea52.zip
pfsense-248501cd9d4d4370a95ec1f6f679afa3c26bea52.tar.gz
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'etc')
-rw-r--r--etc/ca_countries245
-rw-r--r--etc/inc/config.lib.inc4
-rw-r--r--etc/inc/system.inc37
3 files changed, 268 insertions, 18 deletions
diff --git a/etc/ca_countries b/etc/ca_countries
new file mode 100644
index 0000000..291711c
--- /dev/null
+++ b/etc/ca_countries
@@ -0,0 +1,245 @@
+US United States of America
+CA Canada
+AX Aland Islands
+AD Andorra
+AE United Arab Emirates
+AF Afghanistan
+AG Antigua and Barbuda
+AI Anguilla
+AL Albania
+AM Armenia
+AN Netherlands Antilles
+AO Angola
+AQ Antarctica
+AR Argentina
+AS American Samoa
+AT Austria
+AU Australia
+AW Aruba
+AZ Azerbaijan
+BA Bosnia and Herzegovina
+BB Barbados
+BD Bangladesh
+BE Belgium
+BF Burkina Faso
+BG Bulgaria
+BH Bahrain
+BI Burundi
+BJ Benin
+BM Bermuda
+BN Brunei Darussalam
+BO Bolivia
+BR Brazil
+BS Bahamas
+BT Bhutan
+BV Bouvet Island
+BW Botswana
+BZ Belize
+CA Canada
+CC Cocos (Keeling) Islands
+CF Central African Republic
+CH Switzerland
+CI Cote D'Ivoire (Ivory Coast)
+CK Cook Islands
+CL Chile
+CM Cameroon
+CN China
+CO Colombia
+CR Costa Rica
+CS Czechoslovakia (former)
+CV Cape Verde
+CX Christmas Island
+CY Cyprus
+CZ Czech Republic
+DE Germany
+DJ Djibouti
+DK Denmark
+DM Dominica
+DO Dominican Republic
+DZ Algeria
+EC Ecuador
+EE Estonia
+EG Egypt
+EH Western Sahara
+ER Eritrea
+ES Spain
+ET Ethiopia
+FI Finland
+FJ Fiji
+FK Falkland Islands (Malvinas)
+FM Micronesia
+FO Faroe Islands
+FR France
+FX France, Metropolitan
+GA Gabon
+GB Great Britain (UK)
+GD Grenada
+GE Georgia
+GF French Guiana
+GG Guernsey
+GH Ghana
+GI Gibraltar
+GL Greenland
+GM Gambia
+GN Guinea
+GP Guadeloupe
+GQ Equatorial Guinea
+GR Greece
+GS S. Georgia and S. Sandwich Isls.
+GT Guatemala
+GU Guam
+GW Guinea-Bissau
+GY Guyana
+HK Hong Kong
+HM Heard and McDonald Islands
+HN Honduras
+HR Croatia (Hrvatska)
+HT Haiti
+HU Hungary
+ID Indonesia
+IE Ireland
+IL Israel
+IM Isle of Man
+IN India
+IO British Indian Ocean Territory
+IS Iceland
+IT Italy
+JE Jersey
+JM Jamaica
+JO Jordan
+JP Japan
+KE Kenya
+KG Kyrgyzstan
+KH Cambodia
+KI Kiribati
+KM Comoros
+KN Saint Kitts and Nevis
+KR Korea (South)
+KW Kuwait
+KY Cayman Islands
+KZ Kazakhstan
+LA Laos
+LC Saint Lucia
+LI Liechtenstein
+LK Sri Lanka
+LS Lesotho
+LT Lithuania
+LU Luxembourg
+LV Latvia
+LY Libya
+MA Morocco
+MC Monaco
+MD Moldova
+ME Montenegro
+MG Madagascar
+MH Marshall Islands
+MK Macedonia
+ML Mali
+MM Myanmar
+MN Mongolia
+MO Macau
+MP Northern Mariana Islands
+MQ Martinique
+MR Mauritania
+MS Montserrat
+MT Malta
+MU Mauritius
+MV Maldives
+MW Malawi
+MX Mexico
+MY Malaysia
+MZ Mozambique
+NA Namibia
+NC New Caledonia
+NE Niger
+NF Norfolk Island
+NG Nigeria
+NI Nicaragua
+NL Netherlands
+NO Norway
+NP Nepal
+NR Nauru
+NT Neutral Zone
+NU Niue
+NZ New Zealand (Aotearoa)
+OM Oman
+PA Panama
+PE Peru
+PF French Polynesia
+PG Papua New Guinea
+PH Philippines
+PK Pakistan
+PL Poland
+PM St. Pierre and Miquelon
+PN Pitcairn
+PR Puerto Rico
+PS Palestinian Territory
+PT Portugal
+PW Palau
+PY Paraguay
+QA Qatar
+RE Reunion
+RO Romania
+RS Serbia
+RU Russian Federation
+RW Rwanda
+SA Saudi Arabia
+SB Solomon Islands
+SC Seychelles
+SE Sweden
+SG Singapore
+SH St. Helena
+SI Slovenia
+SJ Svalbard and Jan Mayen Islands
+SK Slovak Republic
+SL Sierra Leone
+SM San Marino
+SN Senegal
+SR Suriname
+ST Sao Tome and Principe
+SU USSR (former)
+SV El Salvador
+SZ Swaziland
+TC Turks and Caicos Islands
+TD Chad
+TF French Southern Territories
+TG Togo
+TH Thailand
+TJ Tajikistan
+TK Tokelau
+TM Turkmenistan
+TN Tunisia
+TO Tonga
+TP East Timor
+TR Turkey
+TT Trinidad and Tobago
+TV Tuvalu
+TW Taiwan
+TZ Tanzania
+UA Ukraine
+UG Uganda
+UM US Minor Outlying Islands
+US United States
+UY Uruguay
+UZ Uzbekistan
+VA Vatican City State (Holy See)
+VC Saint Vincent and the Grenadines
+VE Venezuela
+VG Virgin Islands (British)
+VI Virgin Islands (U.S.)
+VN Viet Nam
+VU Vanuatu
+WF Wallis and Futuna Islands
+WS Samoa
+YE Yemen
+YT Mayotte
+ZA South Africa
+ZM Zambia
+COM US Commercial
+EDU US Educational
+GOV US Government
+INT International
+MIL US Military
+NET Network
+ORG Non-Profit Organization
+ARPA Old style Arpanet
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index 859eb8e..575a661 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -342,8 +342,10 @@ function conf_mount_rw() {
function conf_mount_ro() {
global $g;
+ /* Do not trust $g['platform'] since this can be clobbered during factory reset. */
+ $platform = trim(file_get_contents("/etc/platform"));
/* do not umount on cdrom or pfSense platforms */
- if($g['platform'] == "cdrom" or $g['platform'] == "pfSense")
+ if($platform == "cdrom" or $platform == "pfSense")
return;
if($g['booting'])
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index aadcdaa..7fd3bcf 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -799,8 +799,10 @@ function system_webgui_start() {
}
/* generate lighttpd configuration */
+ $max_procs = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
system_generate_lighty_config("{$g['varetc_path']}/lighty-webConfigurator.conf",
- $crt, $key, $ca, "lighty-webConfigurator.pid", $portarg, "/usr/local/www/");
+ $crt, $key, $ca, "lighty-webConfigurator.pid", $portarg, "/usr/local/www/",
+ "cert.pem", "ca.pem", $max_procs);
/* attempt to start lighthttpd */
$res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-webConfigurator.conf");
@@ -880,6 +882,7 @@ function system_generate_lighty_config($filename,
}
// Ramp up captive portal max procs
+ // Work relative to the default of 2, for values that would be >2.
if($captive_portal == true) {
if($avail > 65 and $avail < 98) {
$max_procs = 1;
@@ -888,38 +891,38 @@ function system_generate_lighty_config($filename,
$max_procs = 2;
}
if($avail > 127 and $avail < 256) {
- $max_procs = 3;
+ $max_procs += 1;
}
if($avail > 255 and $avail < 384) {
- $max_procs = 4;
+ $max_procs += 2;
}
if($avail > 383) {
- $max_procs = 5;
+ $max_procs += 3;
}
}
if($captive_portal == true) {
$bin_environment = <<<EOC
- "bin-environment" => (
- "PHP_FCGI_CHILDREN" => "$max_procs",
- "PHP_FCGI_MAX_REQUESTS" => "500"
- ),
+ "bin-environment" => (
+ "PHP_FCGI_CHILDREN" => "$max_procs",
+ "PHP_FCGI_MAX_REQUESTS" => "500"
+ ),
EOC;
} else if ($avail > 0 and $avail < 128) {
$bin_environment = <<<EOC
- "bin-environment" => (
- "PHP_FCGI_CHILDREN" => "$max_procs",
- "PHP_FCGI_MAX_REQUESTS" => "2",
- ),
+ "bin-environment" => (
+ "PHP_FCGI_CHILDREN" => "$max_procs",
+ "PHP_FCGI_MAX_REQUESTS" => "2",
+ ),
EOC;
} else
$bin_environment = <<<EOC
- "bin-environment" => (
- "PHP_FCGI_CHILDREN" => "$max_procs",
- "PHP_FCGI_MAX_REQUESTS" => "500"
- ),
+ "bin-environment" => (
+ "PHP_FCGI_CHILDREN" => "$max_procs",
+ "PHP_FCGI_MAX_REQUESTS" => "500"
+ ),
EOC;
if($fast_cgi_enable == true) {
@@ -934,7 +937,7 @@ fastcgi.server = ( ".php" =>
"socket" => "{$g['tmp_path']}/php-fastcgi.socket",
"min-procs" => 0,
"max-procs" => {$max_procs},
- {$bin_environment}
+{$bin_environment}
"bin-path" => "/usr/local/bin/php"
)
)
OpenPOWER on IntegriCloud