summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-19 04:55:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-19 04:55:14 +0000
commit45f7f880baa302017f9e4687f4c3e32ffff48ca8 (patch)
treee77e77a96ce5408ac7337526e485e920cfc212ce /etc/inc
parent8fb67752dd480bd773150b1304c7468b5fd91869 (diff)
downloadpfsense-45f7f880baa302017f9e4687f4c3e32ffff48ca8.zip
pfsense-45f7f880baa302017f9e4687f4c3e32ffff48ca8.tar.gz
Unset the LAN interface after the user has commited. Otherwise if they
select N that they are not happy with the setup we have already removed the configuration sections.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/config.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 04afef0..c021ae7 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1490,8 +1490,6 @@ EOD;
if($lanif == "") {
if($g['minimum_nic_count'] < 2) {
- unset($config['interfaces']['lan']);
- unset($config['dhcpd']['lan']);
break;
} else {
fclose($fp);
@@ -1576,10 +1574,13 @@ Do you want to proceed [y|n]?
EOD;
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
- if($lanif)
+ if($lanif) {
$config['interfaces']['lan']['if'] = $lanif;
- else
- unset($config['interfaces']['lan']['if']);
+ } else {
+ unset($config['interfaces']['lan']);
+ unset($config['dhcpd']['lan']);
+ unset($config['interfaces']['lan']['if']);
+ }
if (preg_match($g['wireless_regex'], $lanif)) {
if (!is_array($config['interfaces']['lan']['wireless']))
$config['interfaces']['lan']['wireless'] = array();
OpenPOWER on IntegriCloud