From 766bbe9d214692df21046d858498333b7512b5cc Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 27 Jun 2012 16:51:31 -0400 Subject: LAN is not special here anymore. Do not remove the interface again (it was alraedy removed before this block), do not remove NAT and such (OPTs may still need it!) and no need to remove shaper. Improve DHCP check and generalize it to work on any interface, not just LAN. --- usr/local/www/interfaces_assign.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 8e4cff2..73b697b 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -273,15 +273,9 @@ if ($_GET['act'] == "del") { unset($config['interfaces'][$id]); /* delete the specified OPTn or LAN*/ - if($id == "lan") { - unset($config['interfaces']['lan']); - if (is_array($config['dhcpd'])) - unset($config['dhcpd']['lan']); - unset($config['shaper']); - unset($config['ezshaper']); - unset($config['nat']); - system("rm /var/dhcpd/var/db/*"); - services_dhcpd_configure(); + if (is_array($config['dhcpd']) && is_array($config['dhcpd'][$id])) { + unset($config['dhcpd'][$id]); + services_dhcpd_configure(); } if (count($config['filter']['rule']) > 0) { -- cgit v1.1