You are not logged in.

#1 2008-09-18 07:03:04

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

[SOLVED]How should I run commands as root at startup?

Questions like this show how much of a Linux/Arch noob I still am wink

Where am I supposed to add commands that should be run as root at startup? I've found a few places that might work (add a file under /etc/init.d/, add lines to rc.local or rc.*) but I just can't find anything in the wiki or through search engines that gives a clear answer concerning where user-added commands belong.

This really is a general question for future reference but it was brought on by a specific need. I'm using OSS at the moment and in order to set the default sound card, I've relinked /dev/dsp to my preferred sound card as recommended on a page linked from the Arch OSS wiki page. The problem is that it gets reset to the onboard card at startup and I don't want to have to configure that manually every time I restart ("manually" includes having to enter a sudo password). I don't want to completely remove detection of the onboard card either as the second method on that page recommends.

Thanks.

Last edited by Xyne (2008-09-18 07:51:59)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2008-09-18 07:05:20

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]How should I run commands as root at startup?

the best and clean solution is rc.local


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2008-09-18 07:51:40

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED]How should I run commands as root at startup?

wonder wrote:

the best and clean solution is rc.local

Thanks for the quick reply, wonder.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB