diff options
-rwxr-xr-x | etc/rc.bootup | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup index c5a90db..64362bf 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(); |