diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-02-19 05:05:26 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-02-19 05:05:26 +0000 |
commit | 8b67117b2132786ae1438304edc26e6c117f368a (patch) | |
tree | f31026f8200c3e39aa3784fa1f34110dd47eefb3 /etc/inc | |
parent | 45f7f880baa302017f9e4687f4c3e32ffff48ca8 (diff) | |
download | pfsense-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')
-rw-r--r-- | etc/inc/config.inc | 19 |
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'])) |