summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-19 05:05:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-19 05:05:26 +0000
commit8b67117b2132786ae1438304edc26e6c117f368a (patch)
treef31026f8200c3e39aa3784fa1f34110dd47eefb3 /etc/inc/config.inc
parent45f7f880baa302017f9e4687f4c3e32ffff48ca8 (diff)
downloadpfsense-8b67117b2132786ae1438304edc26e6c117f368a.zip
pfsense-8b67117b2132786ae1438304edc26e6c117f368a.tar.gz
Ask the user if they would like to unload the IP address configuration of
the LAN interface after they have elected to remove it (appliance mode).
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc19
1 files changed, 16 insertions, 3 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index c021ae7..aa7b14b 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1577,9 +1577,22 @@ EOD;
if($lanif) {
$config['interfaces']['lan']['if'] = $lanif;
} else {
- unset($config['interfaces']['lan']);
- unset($config['dhcpd']['lan']);
- unset($config['interfaces']['lan']['if']);
+
+echo <<<EODD
+
+You have chosen to remove the LAN interface.
+
+Would you like to remove the IP LAN address and
+unload the interface now? [y|n]?
+
+EODD;
+
+ if (strcasecmp(chop(fgets($fp)), "y") == 0)
+ mwexec("/sbin/ifconfig delete " . $config['interfaces']['lan']);
+
+ 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']))
OpenPOWER on IntegriCloud