You are not logged in.

#1 2009-04-03 06:20:36

SLKDK
Member
Registered: 2008-08-11
Posts: 61

[SOLVED] Execute piece of code at every boot

Hi all.

My laptop has the rtl8187 wireless, but it is a little unstable.
To make it work good, this command helps:

as root:
$  iwconfig wlan0 rate 24.0M fixed

But its annoying at every boot, to log in as root at execute that command.
Im starting my X with .xinitrc (startx), so I could just put in a "sudo iwconfig wlan0... etc" and make sure my user can sudo iwconfig without asking for password.

But isnt there a better way? Maybe put it in the rc.conf file somehow? Or even better: Im using WICD as 'networkmanager' - is there some files I could paste the fix-code into, so at every connect it execute the fix-code?


Best regards

Last edited by SLKDK (2009-04-03 08:36:27)

Offline

#2 2009-04-03 06:22:21

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: [SOLVED] Execute piece of code at every boot

/etc/rc.local wink

Offline

#3 2009-04-03 06:26:50

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Execute piece of code at every boot

AndyRTR wrote:

/etc/rc.local wink

Yes, maybe. Can it run before wicd has established the connectin?

Last edited by fukawi2 (2009-04-03 06:28:39)

Offline

#4 2009-04-03 06:32:59

SLKDK
Member
Registered: 2008-08-11
Posts: 61

Re: [SOLVED] Execute piece of code at every boot

fukawi2 wrote:
AndyRTR wrote:

/etc/rc.local wink

Yes, maybe. Can it run before wicd has established the connectin?

Yes it can big_smile Have just tested it, and it works, even before Wicd gets startet and is connected.

Thanks, both of you.

Offline

#5 2009-04-03 08:35:26

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Execute piece of code at every boot

Lovely smile

Can you edit your original post to mark it as SOLVED please? smile

Offline

Board footer

Powered by FluxBB