LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   scripts (https://www.linuxquestions.org/questions/linux-general-1/scripts-385910/)

Anden008 11-23-2005 02:52 PM

scripts
 
Hi... When I start my computer I allways have to do two things:
turn on my wirelessled
connect to my wireless network

Are there a way to make a script to do this automatic?
Some of the commands requires root.. The commands are shown below

[anden@dhcppc1 ~]$ su -
Password:
[root@dhcppc1 ~]# modprobe acerhk
[root@dhcppc1 ~]# echo 1 > /proc/driver/acerhk/wirelessled
[root@dhcppc1 ~]#

And then I open Network manager to connect to the wireless network

Tinkster 11-23-2005 03:10 PM

Pretty much every distro will have a rc.local (or equivalent)
script that is run as the last script before runlevel 3(4,5).

In Slackware it's /etc/rc.d/rc.local
(SuSE has a boot.local, I think),
others may vary ...

Just put your commands in there.


Cheers,
Tink

Anden008 11-24-2005 03:11 AM

ok.. Iam using FC4, do u know where the rc.local is?

My problem is still that I dont know the commands to connect to a wireless network.. anyone does?

twantrd 11-24-2005 03:22 AM

It should be in /etc (ie. /etc/rc.local).

-twantrd

pk21 11-24-2005 04:03 AM

Just put the 2 lines below at the end of your /etc/rc.local and you should be fine:

modprobe acerhk &
echo 1 > /proc/driver/acerhk/wirelessled

Anden008 11-24-2005 04:39 AM

thx a lot.. that works..
does anyone know how to connect to a wireless network via command line?

averagejoe84 01-04-2006 11:49 AM

su -
password

iwconfig wlan0 essid your essid here
dhclient wlan0


All times are GMT -5. The time now is 04:21 PM.