summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-09 00:29:28 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-09 00:29:28 +0000
commitcc46fb88f4ead13f2f10aaf08926991f1001f016 (patch)
tree9127e076d86acbcda4846bfc7ad0c23837034b1e
parent10f844c1d389e76cb097407869b52fb6533d55d0 (diff)
downloadpfsense-cc46fb88f4ead13f2f10aaf08926991f1001f016.zip
pfsense-cc46fb88f4ead13f2f10aaf08926991f1001f016.tar.gz
* Move minimum nic requirement information to globals.inc
* Move minimum ram requirement information to globals.inc
-rw-r--r--etc/inc/config.inc51
-rw-r--r--etc/inc/globals.inc4
2 files changed, 32 insertions, 23 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 032157d..c9a40bd 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1388,12 +1388,12 @@ function set_networking_interfaces_ports() {
$memory = get_memory();
$avail = $memory[0];
- if($avail < 115) {
+ if($avail < $g['minimum_ram_warning']) {
echo "\n\n\n";
- echo "DANGER! WARNING!\n\n";
- echo "{$g['product_name']} requires *AT LEAST* 128 megs of ram to function correctly.\n";
- echo "Only ($avail) megs of ram has been detected.\n";
- echo "\nPress ENTER to continue.";
+ echo "DANGER! WARNING! ACHTUNG!\n\n";
+ echo "{$g['product_name']} requires *AT LEAST* {$g['minimum_ram_warning_text']} ram to function correctly.\n";
+ echo "Only ({$avail}) megs of ram has been detected.\n";
+ echo "\nPress ENTER to continue. ";
fgets($fp);
echo "\n";
}
@@ -1444,20 +1444,35 @@ EOD;
echo <<<EOD
-*NOTE* {$g['product_name']} requires *AT LEAST* 2 assigned interfaces to function.
+*NOTE* {$g['product_name']} requires {$g['minimum_nic_count_text']} assigned interfaces to function.
If you do not have two interfaces you CANNOT continue.
- If you do not have at least two *REAL* network interface cards
+ If you do not have at least {$g['minimum_nic_count']} *REAL* network interface cards
or one interface with multiple VLANs then {$g['product_name']}
*WILL NOT* function correctly.
If you do not know the names of your interfaces, you may choose to use
auto-detection. In that case, disconnect all interfaces now before
-hitting 'a' to initiate auto detection.
+hitting 'a' to initiate auto detection.
EOD;
do {
+ echo "\nEnter the WAN interface name or 'a' for auto-detection: ";
+ $wanif = chop(fgets($fp));
+ if ($wanif === "") {
+ return;
+ }
+ if ($wanif === "a")
+ $wanif = autodetect_interface("WAN", $fp);
+ else if (!array_key_exists($wanif, $iflist)) {
+ echo "\nInvalid interface name '{$wanif}'\n";
+ unset($wanif);
+ continue;
+ }
+ } while (!$wanif);
+
+ do {
echo "\nEnter the LAN interface name or 'a' for auto-detection: ";
$lanif = chop(fgets($fp));
if ($lanif === "") {
@@ -1468,6 +1483,11 @@ EOD;
if($lanif == "exit") {
exit;
}
+
+ if($lanif == "") {
+ if($g['minimum_nic_count'] < 2)
+ break;
+ }
if ($lanif === "a")
$lanif = autodetect_interface("LAN", $fp);
@@ -1478,21 +1498,6 @@ EOD;
}
} while (!$lanif);
- do {
- echo "\nEnter the WAN interface name or 'a' for auto-detection: ";
- $wanif = chop(fgets($fp));
- if ($wanif === "") {
- return;
- }
- if ($wanif === "a")
- $wanif = autodetect_interface("WAN", $fp);
- else if (!array_key_exists($wanif, $iflist)) {
- echo "\nInvalid interface name '{$wanif}'\n";
- unset($wanif);
- continue;
- }
- } while (!$wanif);
-
/* optional interfaces */
$i = 0;
$optif = array();
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 1494d9e..c346b97 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -61,6 +61,10 @@ $g = array(
"debug" => false,
"latest_config" => "4.1",
"nopkg_platforms" => array("cdrom"),
+ "minimum_ram_warning" => "115",
+ "minimum_ram_warning_text" => "128 megabytes",
+ "minimum_nic_count" => "2",
+ "minimum_nic_count_text" => "*AT LEAST* 2",
"nopccard_platforms" => array("wrap", "net48xx"),
"xmlrpcbaseurl" => "www.pfsense.com",
"captiveportal_path" => "/usr/local/captiveportal",
OpenPOWER on IntegriCloud