diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-11-30 20:15:08 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-11-30 20:15:08 +0000 |
commit | 99c2a28b1d70fe34be2c435977e4afb491618ee5 (patch) | |
tree | fea71023c36f6425c65a5658b5e692acf1a07cf1 /etc | |
parent | 82a1ee994d218e33e76badd2359168d1bac60cef (diff) | |
download | pfsense-99c2a28b1d70fe34be2c435977e4afb491618ee5.zip pfsense-99c2a28b1d70fe34be2c435977e4afb491618ee5.tar.gz |
Add some checks on interface_bring_down and remove unlinking of nameserver.conf it needs some more thinking on how to propperly do that.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 9d4bdcd..163b14b 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -581,6 +581,9 @@ function interface_reconfigure($interface = "wan") { function interface_bring_down($interface = "wan") { global $config, $g; + if (!isset($config['interfaces'][$interface])) + return; + $ifcfg = $config['interfaces'][$interface]; $realif = get_real_interface($interface); @@ -590,7 +593,7 @@ function interface_bring_down($interface = "wan") { /* remove interface up file if it exists */ unlink_if_exists("{$g['tmp_path']}/{$interface}up"); unlink_if_exists("{$g['vardb_path']}/{$interface}ip"); - unlink_if_exists("{$g['varetc_path']}/nameservers.conf"); + //unlink_if_exists("{$g['varetc_path']}/nameservers.conf"); switch ($ifcfg['ipaddr']) { case "pppoe": |