View previous topic :: View next topic |
Author |
Message |
Paapaa l33t
Joined: 14 Aug 2005 Posts: 955 Location: Finland
|
Posted: Sun Oct 02, 2005 4:06 pm Post subject: Running a script on startup?[SOLVED] |
|
|
How do I run a bash script on startup? The script just disables the annoying audio buzz on some nforce2 motherboards (I have Asus A7N8X-Deluxe v2.0):
Code: |
#!/bin/bash
setpci -H1 -s 0:0.0 6E=01
setpci -H1 -s 0:0.0 6F=9F
|
So, how to make the script run once during boot - but before login? I tried using "rc-update add..." but it didn't work. It added the script but during boot it complained about some dependecies. Apparently the above is not an "init script"?
PS. Can kernel do the fix by itself with a kernel option? Are there kernel options???
Last edited by Paapaa on Mon Oct 03, 2005 10:59 am; edited 1 time in total |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Sun Oct 02, 2005 4:11 pm Post subject: |
|
|
You could add the commands to /etc/conf.d/local.start _________________ KDE |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sun Oct 02, 2005 4:13 pm Post subject: |
|
|
Yes, and make sure that the "local" service is run on startup.
Code: |
rc-update add local default
|
Or whatever your default runlevel is called. |
|
Back to top |
|
|
Paapaa l33t
Joined: 14 Aug 2005 Posts: 955 Location: Finland
|
Posted: Mon Oct 03, 2005 10:59 am Post subject: |
|
|
Thanks, that did the trick! |
|
Back to top |
|
|
|