LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-12-2006, 11:54 PM   #1
kccrusher
LQ Newbie
 
Registered: Nov 2006
Distribution: Mandriva 2007
Posts: 10

Rep: Reputation: 0
How do I get a script file to run automatically when linux boots?


There is a script file called ipw3945d-start that has to run to enable my wireless NIC. Right now I have to manually run this everytime linux boots. How do I get this to run automatically? I tried copying the file to the /etc/rd.d/init.d directory but that did not make a difference. I have to run the file as root if that makes a difference. I am running Mandriva 2007. Any assistance will be appreciated.

KC
 
Old 11-13-2006, 12:12 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
is there an /etc/rc5.d (or /etc/rc2.d if your default runlevel is 2) or /etc/init.d ?

Your script should be in /etc/init.d/ directory.
Then you have to make a symlink from your run-level directory.
Code:
cp <script-file> /etc/init.d
ln -s /etc/init.d/<scriptfile> /etc/rc.d/rc5.d/S50<scriptfile>
ln -s /etc/init.d/<scriptfile> /etc/rc.d/rc5.d/K50<scriptfile>
... for eg.

Last edited by Simon Bridge; 11-13-2006 at 12:15 AM.
 
Old 11-13-2006, 06:29 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
If it's just a script to set parameters to connect and not to start any type of service or deamon, just put it in your rc.local startup file.
 
Old 11-13-2006, 02:38 PM   #4
kccrusher
LQ Newbie
 
Registered: Nov 2006
Distribution: Mandriva 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Simon,
I am pretty sure your recommendation did the trick.
I need to test with my wifi at home, but it seems to work with a local hotspot. I can barely maintain a signal with this hotspot, but I did get an address. Thanks for the help.

Tricky,
Thanks for your input also. I tried the recommendations in the order they were given, and the first one seems to have worked.

KC
 
Old 11-13-2006, 09:55 PM   #5
kccrusher
LQ Newbie
 
Registered: Nov 2006
Distribution: Mandriva 2007
Posts: 10

Original Poster
Rep: Reputation: 0
It is confirmed. That worked great, and my wifi connects everytime linux starts now. Thanks.

KC
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run shell script as root automatically elempoimen Linux - Software 8 06-20-2010 01:24 AM
Automatically run script on file? paddyjoy Linux - Software 3 10-03-2006 04:29 PM
Run script automatically shipon_97 Linux - Newbie 2 08-20-2006 12:13 AM
How do I automatically run at boot an X program or script cmisip Linux - General 4 01-05-2003 06:30 PM
How can the linux OS run script automatically at startup? tommylkc Linux - Newbie 1 06-26-2002 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:40 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