* Use is_interface_mismatch() function

This commit is contained in:
Scott Ullrich 2007-04-23 23:32:05 +00:00
parent 92d2426050
commit 8cd7e1fa57

View File

@ -78,27 +78,17 @@
* and ask the user to reassign interfaces. This will
* avoid a reboot and thats a good thing.
*/
$do_assign = 0;
/* we need to ignore the vlan interface checks) */
if(stristr($lan_if,"vlan") == false and stristr($wan_if,"vlan") == false) {
if(does_interface_exist($lan_if) == false) {
echo "\n\n\nLAN {$lan_if} interface mismatch.";
$do_assign = 1;
}
if($config['interfaces']['wan']['ipaddr'] <> "pppoe" && $config['interfaces']['wan']['ipaddr'] <> "pptp" && $do_assign == 0) {
if(does_interface_exist($wan_if) == false) {
echo "\n\n\nWAN {$wan_if} interface mismatch.";
$do_assign = 1;
}
}
if($do_assign == 1 and !file_exists("{$g['tmp_path']}/assign_complete")) {
$noreboot = true;
echo " -- Running interface assignment option.\n";
set_networking_interfaces_ports();
}
}
unmute_kernel_msgs();
/*
* Determine if we need to throw a interface exception
* and ask the user to reassign interfaces. This will
* avoid a reboot and thats a good thing.
*/
while(is_interface_mismatch() == true) {
echo "\nNetwork interface mismatch -- Running interface assignment option.\n";
set_networking_interfaces_ports();
}
/* convert config and clean backups */
echo "Updating configuration...";
convert_config();