diff options
author | Scott Ullrich <sullrich@G5.local> | 2009-10-25 18:31:24 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@G5.local> | 2009-10-25 18:31:24 -0400 |
commit | cddb1be2e9da0ef324ce8a1acc008ff8d6763291 (patch) | |
tree | 46f516ef941b469741ebcf5fc3013fbc34820f8d | |
parent | 19e83210b08fc2d573184411852d4a36d059c9cd (diff) | |
download | pfsense-cddb1be2e9da0ef324ce8a1acc008ff8d6763291.zip pfsense-cddb1be2e9da0ef324ce8a1acc008ff8d6763291.tar.gz |
Do not specify a wlan # and let freebsd decide and return the interface that was created before renaming.
-rw-r--r-- | etc/inc/interfaces.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 0be7d11..6eb5f77 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1306,8 +1306,8 @@ function interface_wireless_clone($if, $wlcfg) { // Setup wireless nic if($wlcfg['wireless']['mode'] == "hostap") $mode = "wlanmode hostap"; - exec("/sbin/ifconfig wlan{$interface_num} create wlandev {$wlcfg['if']} {$mode}"); - exec("/sbin/ifconfig wlan{$interface_num} name {$wlcfg['if']}_wlan{$interface_num}"); + $newif = trim(`/sbin/ifconfig wlan create wlandev {$wlcfg['if']} {$mode}`); + exec("/sbin/ifconfig wlan{$newif} name {$wlcfg['if']}_wlan{$interface_num}"); } } |