• RSS
  • SmsJobs
  • Sms
  • GoogleBuzz
  • Facebook
  • Twitter
  • Linkedin
  • Youtube
The Linux Juggernaut

The Linux Juggernaut

roles on……

Do you like www.linuxnix.com ? Please consider supporting us by becoming a subscriber and get a Linux basics e-book for free.
linux_boot_startup_scripts

This is possible with renaming of the scripts located in running configuration(rc) folders such as /etc/rc1.d, /etc/rc2.d etc. Each of these folders are corresponding to the scripts that will start in that run-level respectively. For example if you want to start some script in runlevel 1, then they should be kept in /etc/rc1.d folder so that when Linux OS is booting up these scripts are executed.

So how can I set priority to my scripts/services?
 Just go in to one of the rc folders, you can see all the scripts which will start in that perticular runlevel.
If you observe those scripts, the name will start with  either K(k for kill) or S(s for start) followed with numbers as shown below.

K09apache2
K15pulseaudio
K20acpi-support
K74bluetooth
README
S30killprocs
S70dns-clean
S70pppd-dns
S90single

So the scripts(services) which ever starts with K, will be killed in the numbering sequence and scripts which starts with S will start according to number followed by first character ie S.

So if you want to start S70dns-clean before all the scripts in this runlevel change the number to S01dns-clean. Thats it, you are done.

Before editing the script name:

K09apache2
K01pulseaudio
K20acpi-support
K74bluetooth
README
S30killprocs
S70dns-clean
S70pppd-dns
S90single

After edting the script name:

K09apache2
K01pulseaudio
K20acpi-support
K74bluetooth
README
S30killprocs
S01dns-clean
S70pppd-dns
S90single

So now the first script/service which start in this list is S01dns-clean
Please comment your thoughts on this. Please visit http://www.linuxnix.com for more linux admin stuff.

Do you like www.linuxnix.com ? Please consider supporting us by becoming a subscriber and get a Linux basics e-book for free.
bySurendra On Friday-December - 10 - 2010

email newsletter

Redhat Flagship dist

Redhat announced that they are going to release RHEL7 by ...

12 examples to use f

Flower brackets examples This is a small post on how to ...

7 Linux read command

read command examples read command is useful in scripts when reading ...

7 linux sort command

Linux/Unix sort command examples This is a small tutorial on how ...

How to find command

How to find command location in Linux and Unix This is ...

  • About Linux Juggernaut

    How the blog name selected? Juggernaut: * a massive inexorable force that seems to crush everything in its way ...readmore>>

  • Contact Me

    Contact us Send an Email Phone number and vCard LinkedIn profile Advertise with us
  • About Me

    Surendra Kumar Chowdary

    My name is Surendra Kumar Anne. I am from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present i work at Persistent Systems as Module Lead.   read more »