From 5d721fa0d83032a15862c7f390674e0a14f4f87f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 9 Dec 2007 04:41:08 +0000 Subject: Move route delete items to system.inc so they are performed on every change --- etc/inc/system.inc | 2 ++ usr/local/www/system.php | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 63a0dc3..e231fd1 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -144,11 +144,13 @@ function system_resolvconf_generate($dynupdate = false) { if($config['system']['dns1gwint']) { $if = $config['system']['dns1gwint']; $gw = $config['interfaces'][$if]['if']; + exec("route delete {$syscfg['dnsserver'][0]}"); exec("route add {$syscfg['dnsserver'][0]} -gw {$gw}"); } if($config['system']['dns2gwint']) { $if = $config['system']['dns2gwint']; $gw = $config['interfaces'][$if]['if']; + exec("route delete {$syscfg['dnsserver'][1]}"); exec("route add {$syscfg['dnsserver'][1]} -gw {$gw}"); } diff --git a/usr/local/www/system.php b/usr/local/www/system.php index f826389..04885d6 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -80,10 +80,6 @@ sort($timezonelist); if ($_POST) { $changecount++; - - /* remove old static route if exists */ - exec("route delete {$pconfig['dns1']}"); - exec("route delete {$pconfig['dns2']}"); unset($input_errors); $pconfig = $_POST; -- cgit v1.1