diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-07-09 16:11:07 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-07-09 16:11:07 +0000 |
commit | 04bff45acec4505520e832c8bafdf64ce71f0dbf (patch) | |
tree | 8cacf5a9ba5abcb47738c0f2743f10642f127949 | |
parent | a9e486854c0d4ff0c5f23193ecf6980f9955a9e8 (diff) | |
download | pfsense-04bff45acec4505520e832c8bafdf64ce71f0dbf.zip pfsense-04bff45acec4505520e832c8bafdf64ce71f0dbf.tar.gz |
Correct typo and better handle recreation of vlan with specific name.
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
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)); |