Commit 1dc4d55e authored by Franco Fichtner's avatar Franco Fichtner

interfaces: flatten code block

parent 0ba0986a
...@@ -1052,34 +1052,31 @@ function interfaces_configure() ...@@ -1052,34 +1052,31 @@ function interfaces_configure()
$realif = $config['interfaces'][$if]['if']; $realif = $config['interfaces'][$if]['if'];
if (strstr($realif, "bridge")) { if (strstr($realif, "bridge")) {
$bridge_list[$if] = $ifname; $bridge_list[$if] = $ifname;
} elseif (strstr($realif, "gre")) {
$delayed_list[$if] = $ifname;
} elseif (strstr($realif, "gif")) {
$delayed_list[$if] = $ifname;
} elseif (strstr($realif, "ovpn")) {
//echo "Delaying OpenVPN interface configuration...done.\n";
continue;
} elseif (!empty($config['interfaces'][$if]['ipaddrv6']) && $config['interfaces'][$if]['ipaddrv6'] == "track6") {
$track6_list[$if] = $ifname;
} else { } else {
if (strstr($realif, "gre")) { if (file_exists("/var/run/booting")) {
$delayed_list[$if] = $ifname; printf(gettext("Configuring %s interface..."), $ifname);
} elseif (strstr($realif, "gif")) { }
$delayed_list[$if] = $ifname; interface_configure($if, $reload);
} elseif (strstr($realif, "ovpn")) { if (file_exists("/var/run/booting")) {
//echo "Delaying OpenVPN interface configuration...done.\n"; echo gettext("done.") . "\n";
continue;
} elseif (!empty($config['interfaces'][$if]['ipaddrv6']) && $config['interfaces'][$if]['ipaddrv6'] == "track6") {
$track6_list[$if] = $ifname;
} else {
if (file_exists("/var/run/booting")) {
printf(gettext("Configuring %s interface..."), $ifname);
}
interface_configure($if, $reload);
if (file_exists("/var/run/booting")) {
echo gettext("done.") . "\n";
}
} }
} }
} }
/* /*
* NOTE: The following function parameter consists of * NOTE: The following function parameter consists of
* 1 - Do not load gre/gif/bridge with parent/member as vip * 1 - Do not load gre/gif/bridge with parent/member as vip
* 2 - Do load gre/gif/bridge with parent/member as vip * 2 - Do load gre/gif/bridge with parent/member as vip
*/ */
/* set up GRE virtual interfaces */ /* set up GRE virtual interfaces */
interfaces_gre_configure(1); interfaces_gre_configure(1);
...@@ -1094,9 +1091,7 @@ function interfaces_configure() ...@@ -1094,9 +1091,7 @@ function interfaces_configure()
if (file_exists("/var/run/booting")) { if (file_exists("/var/run/booting")) {
printf(gettext("Configuring %s interface..."), $ifname); printf(gettext("Configuring %s interface..."), $ifname);
} }
interface_configure($if, $reload); interface_configure($if, $reload);
if (file_exists("/var/run/booting")) { if (file_exists("/var/run/booting")) {
echo gettext("done.") . "\n"; echo gettext("done.") . "\n";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment