HomeHome ArchiveArchive

listing init scripts, sorted by priority on RedHat

If you want to know in which order RedHat will execute init scripts, then you can list them like this:

grep '#\s*chkconfig:' /etc/init.d/* | sed 's/:#//; s/\/etc\/init.d\///;' | awk '{ printf "%2s %2s %7s %s\n", $4, $5, $3, $1 }' | sort

which will produce on my system:

01 99   12345 sysstat                                                                                                                                     
02 99   12345 lvm2-monitor                                                                                                                                
03 97     235 sysstat                                                                                                                                     
05 95     345 kudzu                                                                                                                                       
06 99   12345 cpuspeed                                                                                                                                    
08 92    2345 ip6tables                                                                                                                                   
08 92    2345 iptables                                                                                                                                    
 0 99    2345 microcode_ctl                                                                                                                               
10 90    2345 network                                                                                                                                     
11 88    2345 auditd                                                                                                                                      
11 89       - netplugd                                                                                                                                    
12 87    2345 restorecond                                                                                                                                 
12 88    2345 syslog
13  1     345 setroubleshoot
13 87    2345 irqbalance
13 87    2345 mcstrans
13 87     345 portmap
13 87       - multipathd
14 86     345 nfslock
15 85    2345 mdmonitor
15 85       - mdmpd
18 85     345 rpcidmapd
19 69       - rpcsvcgssd
19 85     345 rpcgssd
20 80       - kdump
22 85     345 messagebus
25 75     345 netfs
25 88    2345 pcscd
27 73       - ypbind
28 72     345 autofs
30 74       - nscd
35 65       - krb524
41 89       - rdisc
 4 99    2345 readahead_early
50 50       - netconsole
55 25    2345 sshd
56 50     345 xinetd
58 74       - ntpd
60 20       - nfs
64 36       - mysqld
80 30    2345 sendmail
85 15    2345 gpm
85 15       - httpd
90 10    2345 xfs
90 10       - psacct
90 60    2345 crond
91 35       - smb
91 35       - winbind
95 05    2345 anacron
95 05       - saslauthd
95  5     345 atd
95  5       - conman
96 99       5 readahead_later
97 03     345 rhnsd
97 03     345 yum-updatesd
98 02     345 avahi-daemon
98 02     345 haldaemon
98 02       - avahi-dnsconfd
99 01    2345 smartd
99 95      35 firstboot

Tomáš Pospíšek