LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-23-2005, 02:52 PM   #1
Anden008
LQ Newbie
 
Registered: Nov 2005
Distribution: Ubuntu 10.4
Posts: 29

Rep: Reputation: 15
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
 
Old 11-23-2005, 03:10 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 11-24-2005, 03:11 AM   #3
Anden008
LQ Newbie
 
Registered: Nov 2005
Distribution: Ubuntu 10.4
Posts: 29

Original Poster
Rep: Reputation: 15
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?
 
Old 11-24-2005, 03:22 AM   #4
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
It should be in /etc (ie. /etc/rc.local).

-twantrd
 
Old 11-24-2005, 04:03 AM   #5
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
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
 
Old 11-24-2005, 04:39 AM   #6
Anden008
LQ Newbie
 
Registered: Nov 2005
Distribution: Ubuntu 10.4
Posts: 29

Original Poster
Rep: Reputation: 15
thx a lot.. that works..
does anyone know how to connect to a wireless network via command line?
 
Old 01-04-2006, 11:49 AM   #7
averagejoe84
Member
 
Registered: Jun 2005
Location: Florissant, MO
Distribution: Fedora 3/4, Centos, Suse 9.1-9.3, CentOS 4.1, Knopix
Posts: 34

Rep: Reputation: 15
su -
password

iwconfig wlan0 essid your essid here
dhclient wlan0
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
What scripts would you like to see? kittani Linux - Software 1 05-20-2004 03:26 AM
Scripts? zombie killa Linux - Software 5 05-29-2003 05:19 PM
scripts mdjames0 Linux - Newbie 4 08-02-2002 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration