Turn off the Wireless card on each boot [duplicate]
You can try to use ifconfig instead...
Add the following to rc.local
$> ifconfig wlan0 down
If you suspend/hibernate your computer the you will have to add the same to the suspend process as well.
Create a file by
$> sudo nano /etc/pm/sleep.d/20_custom_wlan0
add the following to the file.
# Script to disable wlan0 before suspend and restart after wake.
case "${1}" in
suspend|hibernate)
echo suspending wlan0
;;
resume|thaw)
echo Resuming wlan0 - shutting down wlan0
ifconfig wlan0 down
;;
esac
save the file and make sure is executable by
$> sudo nano /etc/pm/sleep.d/20_custom_wlan0
That should do the trick.
By the way the name of the filename doesn't matter so much except it must start with something below 60 as number decide where in the process the file is run. And some system have 60 staring the network card after suspend. Look in the /etc/pm-suspend.log file.
I solved it with this quite "hacky" solution: a sleep 10
delay: It seems like in Ubuntu 14.04 you need to wait some seconds before you disable wifi in /etc/rc.local
.
Use this instead:
sudo nano /etc/rc.local
Use the arrow keys / page up/down keys to navigate to the line before exit 0
and add /bin/sleep 10 && rfkill block wifi
, so that the file will look like this:
# By default, this script does nothing
/bin/sleep 10 && rfkill block wifi
exit 0
The other solution above suppose to be the cleaner one, but that one doesn't always work...