LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2004, 12:10 PM   #1
Andy@DP
Member
 
Registered: Aug 2003
Location: Aberdeen, UK.
Distribution: Debian, Ubuntu
Posts: 208
Blog Entries: 2

Rep: Reputation: 30
Getting script to run at boot


Hey people,
I have problems with my AGP port when booting normally but by typing
Code:
modprobe agpgart
when I go to init3 before logging in, it works fine.
I hate having to go to init 3 do the modprobe and then init 5. It takes too long and I keep forgetting.
I have tried to get the kernel to load the module at boot but the modprobe works and I'm happy with writing a small bash script to do this simple command.

Can I run a script at the end of the level 3 phase of the boot to do the modprobe and if so how?

TIA,
Andy.
 
Old 05-04-2004, 12:18 PM   #2
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
See the /etc/modules.conf (for module loading on startup).
 
Old 05-04-2004, 12:37 PM   #3
Andy@DP
Member
 
Registered: Aug 2003
Location: Aberdeen, UK.
Distribution: Debian, Ubuntu
Posts: 208
Blog Entries: 2

Original Poster
Rep: Reputation: 30
No I tried that, it doesn't work.
Maybe I'm doing it wrong, how would I call that?
And how do you run a script before runlevel 5 kicks in?
 
Old 06-05-2004, 04:53 AM   #4
dglnz
LQ Newbie
 
Registered: Aug 2003
Distribution: mandrake 8.2 upgrading to 9.1 soon
Posts: 7

Rep: Reputation: 0
typed run a linux script at boot got from google your message and others but
info below from url http://www.redhat.com/docs/manuals/l...-run-boot.html

just might help you (or at least point you in a better direction).
dave.

below is a snippet from said url.

1.3. Running Additional Programs at Boot Time



The /etc/rc.d/rc.local script is executed by the init command at boot time or when changing runlevels. Adding commands to this script is an easy way to perform necessary tasks like starting special services or initialize devices without writing complex initialization scripts in the /etc/rc.d/init.d/ directory and creating symbolic links.



The /etc/rc.serial script is used if serial ports must be setup at boot time. This script runs setserial commands to configure the system's serial ports. See the setserial man page for more information.
 
Old 06-05-2004, 08:39 AM   #5
sleeper.service
LQ Newbie
 
Registered: May 2004
Distribution: Mandrake 9.2
Posts: 16

Rep: Reputation: 0
Quote:
without writing complex initialization scripts in the /etc/rc.d/init.d/ directory and creating symbolic links.
In my opinion, it shouldn't be too difficult.
The script, after all, doesn't need to be complex.

Just create your script under "/etc/init.d/".
Make sure it works when called manually.

Give it the same owner/permissions as other "init.d" scripts.
On my system, this would go like:
chown root:root myscript (skip if already root)
chmod u=rwx,g=r,o=r myscript

Finally issue "ln -s /etc/init.d/myscript /etc/rc3.d/S##myscript". Replace ## with two numbers (00...99) to control when exactly your script runs. Within the same runlevel, scripts with smaller numbers get executed before.

Last edited by sleeper.service; 06-05-2004 at 09:54 AM.
 
  


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
Can't get script to run on boot Ook Slackware 7 03-05-2005 02:31 AM
Script to run at boot robbow52 Debian 17 09-03-2004 10:04 PM
Getting a script to run at boot IMNOboist Linux - Software 2 05-10-2004 02:48 AM
Script won't run at boot bugsbunny Slackware - Installation 6 04-19-2004 05:26 PM
Can't get script to run on boot rickenbacherus Linux - General 5 08-21-2003 11:57 PM


All times are GMT -5. The time now is 12:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration