From e4da84d08c300ca5e44dead79399b7f4c4f99ec1 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Sat, 17 Sep 2005 13:42:31 +0000 Subject: Do it the right way and lock the config file before restarting dhcpd --- usr/local/www/services_dhcp_edit.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr/local/www/services_dhcp_edit.php') diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php index 4a284fd..d1d6ac2 100755 --- a/usr/local/www/services_dhcp_edit.php +++ b/usr/local/www/services_dhcp_edit.php @@ -126,8 +126,13 @@ if ($_POST) { if (isset($config['dhcpd'][$if]['staticarp'])) interfaces_staticarp_configure($if); - services_dhcpd_configure(); - + $retval = 0; + config_lock(); + $retval = services_dhcpd_configure(); + config_unlock(); + + $savemsg = get_std_save_message($retval); + header("Location: services_dhcp.php?if={$if}"); exit; } -- cgit v1.1