From 8cd7e1fa57a5926f23e65b577c36d4ad442d90ab Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 23 Apr 2007 23:32:05 +0000 Subject: [PATCH] * Use is_interface_mismatch() function * Do not allow configuration to continue until the interfaces are setup correctly --- etc/rc.bootup | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/etc/rc.bootup b/etc/rc.bootup index c5a90db647..64362bf14d 100755 --- a/etc/rc.bootup +++ b/etc/rc.bootup @@ -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();