Getting script to run at boot
Hey people,
I have problems with my AGP port when booting normally but by typing Code:
modprobe agpgart 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. |
See the /etc/modules.conf (for module loading on startup).
|
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? |
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. |
Quote:
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. |
All times are GMT -5. The time now is 10:36 PM. |