From 04bff45acec4505520e832c8bafdf64ce71f0dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Wed, 9 Jul 2008 16:11:07 +0000 Subject: Correct typo and better handle recreation of vlan with specific name. --- etc/inc/interfaces.inc | 7 ++++--- 1 file 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)); -- cgit v1.1