On Mon, 2003-07-21 at 08:49, Jan dela Cruz wrote:
> Hi all. Just a quick question, is there any way to have redhat start first
> this service, then this service next... somewhat you define the order? its
> like ntsysv, but you have capability to move service up or down, which will
> be followed upon loading?
>
> Cant seem to answer this one... :(
>
> Thanks in advance
RedHat does follow a sysv-like startup.
It goes like this:
1. all the scripts for handling services are in /etc/rc.d/. The these
are scripts that take on a parameter (stop, start, restart, etc)
2. There is a diretory for each runlevel
<--snip! shamelessly taken from /etc/inittab -->
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have
networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
for runlevel 0 (halt), the scripts in rc0.d are executed,
for runlevel 3 (multiuser, no x) the scripts are in rc3.d
for runlevel 6 (reboot) the scripts are in rc6.d
etc..etc..
let's take a look are rc3.d :
doing an ls -l :
K12FreeWnn -> ../init.d/FreeWnn
K20nfs -> ../init.d/nfs
K24irda -> ../init.d/irda
K35smb -> ../init.d/smb
K35winbind -> ../init.d/winbind
K74ntpd -> ../init.d/ntpd
K95firstboot -> ../init.d/firstboot
S05kudzu -> ../init.d/kudzu
S08iptables -> ../init.d/iptables
S09isdn -> ../init.d/isdn
S10network -> ../init.d/network
S12syslog -> ../init.d/syslog
S17keytable -> ../init.d/keytable
S20random -> ../init.d/random
S24pcmcia -> ../init.d/pcmcia
S28autofs -> ../init.d/autofs
S56rawdevices -> ../init.d/rawdevices
S56xinetd -> ../init.d/xinetd
S80sendmail -> ../init.d/sendmail
S85gpm -> ../init.d/gpm
S85ser -> ../init.d/ser
S90canna -> ../init.d/canna
S95anacron -> ../init.d/anacron
S99local -> ../rc.local
You can see that the files here are just files symlinked from
/etc/init.d. With a filename format of either :
Kxxservice or
Sxxservice
what sysinit does is to execute all the scripts beginning with 'K' with
a parameter 'stop'.
eg. K12FreeWnn stop (essentially /etc/rc.d/init.d/FreeWnn stop)
K20nfs stop (notice the patter)
..
and all scripts beginning with an 'S' with the parameter 'start'
eg. (umm..gets naman di ba?)
The order in which they are called is from 00 to 99 (or tecnically, the
order that comes up when you get a directory listing).
So, just change the numbers in Sxx and Kxx to shuffle `em services.
hope this helps
ramil
[EMAIL PROTECTED]
There are 2 ways to write error free programs...only the third one
works.
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie