wifi off at boot up

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

wifi off at boot up

Postby stabby on Thu Feb 05, 2009 10:53 am

Hi
Just installed Mint for the first time on my laptop and it turned out I have no internet. Fortunately having access to another computer I found a solution. Turned my wifi on by typing in terminal:

Code: Select all
sudo su
<password here>
echo 1 > /sys/devices/platform/asus-laptop/wlan


It's great that it works, but I have to type that in every time I boot up. Is there any way to automate this, or at least have it executed when I press wifi button, which incidentaly should be doing the exact same thing?
I'm running Mint 6 main.
Any and all help appreciated :)
stabby
Level 1
Level 1
 
Posts: 11
Joined: Tue Feb 03, 2009 10:24 am
Location: Gdansk, POLAND

Linux Mint is funded by ads and donations.
 

Re: wifi off at boot up

Postby Husse on Sat Feb 07, 2009 5:31 pm

You can create a small script and put in init.d to be run at boot
To my knowledge being in init.d makes it run as root so you should not have to worry about that
Create a file on the desktop, call it aslan or something :) and add this content
Code: Select all
#!/bin/bash
echo 1 > /sys/devices/platform/asus-laptop/wlan

Make the file executable (right click you are still in home :))
Add the file to init.d - open a terminal on the desktop
Code: Select all
sudo mv aslan /etc/init.d

Now get it to execute on boot - you can do that "manually" or with update-rc.d
Note update-rc.d is really only intended for people creating .deb packages and the like - be careful, not all you see about this is correct
Code: Select all
sudo update-rc.d aslan start 99 2 3 4 5 .

This means that this script will start last (99 - you can lower the number if you need it to run earlier) and 2345 are run levels
Ubuntu does not use run levels any more so that's for backwards compatibility (levels 0 1 6 still used)
I see no need for this to run at shut down - quite the opposite
The script does not conform to how init.d scripts are to be written, but when it comes to something as simple as this one....
You could possibly use the sessions tool....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Newbie Questions

Who is online

Users browsing this forum: austin.texas, DrMcKay, Google [Bot], JeremyB and 37 guests