Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
modprobe and iwconfig at boot (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ignatius881
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 96
Location: Oviedo

PostPosted: Sat Dec 17, 2011 12:45 pm    Post subject: modprobe and iwconfig at boot (SOLVED) Reply with quote

Hello.

Well, I don't want to write these commands everytime I boot my system. And I want to know if there is a way to automatize the process.

This is what I have to write after login:

Code:
modprobe -r rt2800usb rt2x00usb rt2x00lib
modprobe rt2800usb
iwconfig wlan0 essid MY_ESSID key s:MY_KEY
ifconfig wlan0 up
dhcpcd wlan0


Thanks in advance.


Last edited by Ignatius881 on Sun Dec 18, 2011 8:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Sat Dec 17, 2011 1:24 pm    Post subject: Reply with quote

Ignatius881,

Since you are using wireless-tools you can add the configuration to /etc/init.d/net
There is a fully commented example at /usr/share/doc/openrc-0.9.4/net.example.bz2

To automate what you have written (you should not need to) put the commands into a file in /etc/local.d/ with a file name ending in .start.

Read the script /etc/init.d/local to see whats going on. Essentaily, all files in /etc/local.d/ with names ending in .start are run at startup.
Files ending in .stop are run at shutdown
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ignatius881
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 96
Location: Oviedo

PostPosted: Sat Dec 17, 2011 3:07 pm    Post subject: Reply with quote

Thanks, it seems that it's working well :D
Back to top
View user's profile Send private message
Ignatius881
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 96
Location: Oviedo

PostPosted: Sat Dec 17, 2011 11:49 pm    Post subject: Reply with quote

No, sorry, I was wrong.

I created the file /etc/local.d/wifi.start with these commands, including the dhcpcd wlan0, and I still have to activate manually the connection, either writing ifconfig wlan0 up or writing everything. And I also wrote these commands in /etc/init.d/net.

Apart from that, when booting, a message about wpa_supplicant appears.

Code:
 * Bringing up interface wlan0
 *   Starting wpa_supplicant on wlan0 ...
 *   /etc/wpa_supplicant/wpa_supplicant.conf not found                    [ !! ]
 * ERROR: net.wlan0 failed to start


But I neither installed wpa_supplicant (I use a WEP key) nor specified the use of wpa_supplicant in any file.

I use wicd and added it to boot with rc-update.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Sun Dec 18, 2011 7:47 pm    Post subject: Reply with quote

Ignatius881,

Something has installed wpa-supplicant for you because its trying to start but can't because its configuration file is missing.
If you use wicd, you must not start any network services with the normal gentoo network scripts because wicd and teh scripts will both try to do something simalar at the same time. Neither will work.

You should ensure that only the net.lo script exixts in /etc/init.d/

Do you really mean that wicd has been added to the boot runlevel or the defualt runlevel?
net.lo is the only network interface that should be in the boot runlevel. All the others and wicd should be in defualt.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ignatius881
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 96
Location: Oviedo

PostPosted: Sun Dec 18, 2011 8:22 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Ignatius881,

Something has installed wpa-supplicant for you because its trying to start but can't because its configuration file is missing.
If you use wicd, you must not start any network services with the normal gentoo network scripts because wicd and teh scripts will both try to do something simalar at the same time. Neither will work.

You should ensure that only the net.lo script exixts in /etc/init.d/

Do you really mean that wicd has been added to the boot runlevel or the defualt runlevel?
net.lo is the only network interface that should be in the boot runlevel. All the others and wicd should be in defualt.


Mmm, I've put wicd in boot level because the wiki says that: http://en.gentoo-wiki.com/wiki/Wicd

OK, I'll delete all lines with modprobe and so on of those files which I created, /etc/local.d/wifi.start and /etc/init.d/net, and I also delete the net.eth0 and net.wlan0 files, if I've understood well.
Back to top
View user's profile Send private message
Ignatius881
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 96
Location: Oviedo

PostPosted: Sun Dec 18, 2011 8:42 pm    Post subject: Reply with quote

Thanks a lot, now I can say that it works perfectly :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum