The handbook suggests:
put them in /etc/rc.conf for setting up wifi.
But I always change place and need connecting to different AP. So, I just remove the rc.conf lines above. When I boot the machine, start up the desktop, I just run these commands instead:
I put them in a script, run every time I enter the desktop!
So, what is the difference?
Is it good, if I always create the wlan0 after I login system?
Code:
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
But I always change place and need connecting to different AP. So, I just remove the rc.conf lines above. When I boot the machine, start up the desktop, I just run these commands instead:
Code:
ifconfig ath0 up
ifconfig wlan0 create wlandev ath0
ifconfig wlan0 up
## I will change the network(/etc/wpa_supplicant.conf) for this time using wpa_cli
/etc/rc.d/wpa_supplicant start wlan0
sleep 1
dhclient -b wlan0
sleep 2
pfctl -Fa -f /etc/pf/here.conf
So, what is the difference?
Is it good, if I always create the wlan0 after I login system?