summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 95b8db4..fe84de1 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -73,12 +73,13 @@ function interface_vlan_configure($if, $tag, $vlanif = "") {
/* make sure the parent interface is up */
mwexec("/sbin/ifconfig " . escapeshellarg($if) . " up");
- if ($g['booting'] || !(empty($vlanif)))
+ if ($g['booting'] || !(empty($vlanif))) {
+ mwexec("/sbin/ifconfig {$vlanif} destroy");
mwexec("/sbin/ifconfig {$vlanif} create");
- else
+ } else
$vlanif = exec("/sbin/ifconfig vlan create");
- mwexec("/sbin/ifconfig {$vilanif} vlan " .
+ mwexec("/sbin/ifconfig {$vlanif} vlan " .
escapeshellarg($tag) . " vlandev " .
escapeshellarg($if));
OpenPOWER on IntegriCloud