Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running a script on startup?[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Paapaa
l33t
l33t


Joined: 14 Aug 2005
Posts: 955
Location: Finland

PostPosted: Sun Oct 02, 2005 4:06 pm    Post subject: Running a script on startup?[SOLVED] Reply with quote

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
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Sun Oct 02, 2005 4:11 pm    Post subject: Reply with quote

You could add the commands to /etc/conf.d/local.start
_________________
KDE
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun Oct 02, 2005 4:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Paapaa
l33t
l33t


Joined: 14 Aug 2005
Posts: 955
Location: Finland

PostPosted: Mon Oct 03, 2005 10:59 am    Post subject: Reply with quote

Thanks, that did the trick!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum