Startup Scripts

David M. Carney carney1979 at gmail.com
Wed Sep 7 01:16:04 UTC 2005


On Mon, 2005-09-05 at 22:32 -0400, Craig Hagerman wrote:
> 
> 
> On 9/5/05, David M. Carney <carney1979 at gmail.com> wrote:
>         If I want to add my own startup script to be run at bootup,
>         how do I go
>         about doing it?
>         
> 
> Write a script. put it in the /etc/init.d/ directory.
> Lets say you called it FOO. You then run
> 
> % update-rc.d FOO defaults
> 
> You can check out 
> % man update-rc.d for more information. It is a Debian utility to
> install scripts. The option "defaults" puts a link to start FOO in run
> levels 2, 3, 4 and 5. (and puts a link to stop FOO into 0, 1 and 6.)
> 
> By the way, can anyone tell me what command I can use to tell what run
> level I am currently in?
> 
> Craig

Thanks, Craig! That did the trick! Should have remembered that one from
my Gentoo days.

By the way, in answer to your question, the runlevel command should do
the trick.

Just type:

% runlevel

On my computer, it returns:

david at n1zhe:~$ runlevel
N 2
david at n1zhe:~$

man runlevel for more info.

David, N1ZHE

-- 
Registered Linux User #297958
http://carney1979.blogspot.com/





More information about the ubuntu-users mailing list