How to Set Priority for a service at booting of Linux


This is possible with renaming of the scripts located in running configuration(rc) folders. As you people know that
all the startup scripts are stored in rc1.d, rc2.d etc... each of these folders corresponding to scripts to be started in that run-level 

for example.. if you want to start some script in runlevel 1 they are kept in /etc/rc1.d folder so that when Linux is booting up these scripts are executed at runlevel 1.


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 are started in that runlevel.. 
if you observe those scripts, these scripts will start with different numbers. here are some for your reference.

K09apache2
K15pulseaudio
K20acpi-support
K20kerneloops
K20saned
K20speech-dispatcher
K20virtualbox-ose
K20virtualbox-ose-guest-utils
K74bluetooth
README
S30killprocs
S70dns-clean
S70pppd-dns
S90single


so the script(services) start sequence will be like K09apache2 then K15pulseaudio so on.. so if you want to give priority to your service just name with less number.. as shown below..



K09apache2
K01pulseaudio
K20acpi-support
K20kerneloops
K20saned
K20speech-dispatcher
K20virtualbox-ose
K20virtualbox-ose-guest-utils
K74bluetooth
README
S30killprocs
S70dns-clean
S70pppd-dns
S90single



So now the first script/service which start in this list is K01pulseaudio


Please comment your thoughts on this..

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    0 comments:

    Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here