From d378c59ba314838a95133d6ec4c208c9700006e6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 12 Feb 2006 00:06:44 +0000 Subject: Remove previous leases when toggling failover dhcp option --- usr/local/www/services_dhcp.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr/local/www/services_dhcp.php') diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index defcdcf..6b9736b 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -140,6 +140,10 @@ if ($_POST) { $config['dhcpd'][$if]['range']['to'] = $_POST['range_to']; $config['dhcpd'][$if]['defaultleasetime'] = $_POST['deftime']; $config['dhcpd'][$if]['maxleasetime'] = $_POST['maxtime']; + $previous = $config['dhcpd'][$if]['failover_peerip']; + if($previous <> $_POST['failover_peerip']) { + mwexec("rm -rf /var/dhcpd/var/db/*"); + } $config['dhcpd'][$if]['failover_peerip'] = $_POST['failover_peerip']; unset($config['dhcpd'][$if]['winsserver']); -- cgit v1.1