Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Aspire can be executed automatically in the startup process of any Linux distribution; however, there are some differences in the way to do it from distribution to distribution. This will explain how to do it for two of the most widely used distributions. Basically, all the distributions will use shell scripts to execute the programs they need to run during the boot process; each will be executed once the boot process reaches a particular "run level" associated with the script.

:
Panel
titleOn this page

Table of Contents

Red Hat Linux

This distribution does not use the inittab as the main reference to start processes; instead, it uses a series of folders (one per run level) where there are links to the files that need to be executed. Here's what you need to do:

1 First, create a script that executes your program using the "sh" command. The script should have one line per instance to start:

Code Block
languagetext
themeFadeToGrey
sh /home/aspire/aspire-dist/bin/aspire.sh 

2. Add as many lines as you need to and save the file to:

Code Block
languagetext
themeFadeToGrey
/etc/rc.d/init.d/my-script 

That's the main location for all startup scripts.

3. Next, create a symbolic link to my-script in the corresponding folder of the run level you want the program to be started, most likely run level 3:

Code Block
languagetext
themeFadeToGrey
ln -s /etc/rc.d/init.d/my-script ./etc/rc3.d/S99aspire

Where

Code Block
languagetext
themeFadeToGrey
ln -s [TARGET DIRECTORY OR FILE] ./[SHORTCUT]

You can reach other run level links by changing the number on rcX.d, e.g rc0.d

The name of the link must be something like "SXXthe-name" where S indicates that this is a startup script, XX is the priority, and the-name is whatever name you want to use for the link.

4. Restart the server and check that your instances are running.

For more information on Red Hat Linux run levels, see http://ezinearticles.com/?Redhat-Linux-Runlevels&id=3990890.


Suse Linux

In Suse Linux (and other distributions like it), use a single file to set the scripts that will be executed.

1. First, locate the init process configuration file in the following path:

Code Block
languagetext
themeFadeToGrey
/etc/init.d/inittab

2. Open to edit and add the following line:

Code Block
languagetext
aspire:3:respawn:/home/aspire/aspire-dist/bin/aspire.sh

Where the format is:

Code Block
languagetext
id:runlevels:action:process

It's important to mention that you will need to add a line for every instance of aspire you want to run, so you should change the id for everyone.

3. Finally, restart the box and test the changes.

The following explains more about the Linux startup process: http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlrunlevels.html