# this file contains a list of software and what runlevels it is supposed # to be running in; the /etc/rc.d/rc script will read this (in order) and # kill off anything not supposed to be running in this runlevel and start # up anything that is supposed to be running # It uses /var/run/rcstate to keep track of what has been started and # what hasn't to avoid doing a lot of extra work # each line is of the form # id:runlevels:start cmds:stop cmds # lines are processed in the order the appear in the file for starting # services and in reverse order for stopping services. # "start cmds" and "stop cmds" can be any shell commands you like # as long as the don't contain a :. If you don't like it, fix it - I had # no need to. Of course, you can always put stuff in other files and # call those if you have really complex start/stop situations. # the following is an example set of entries which should give everyone # the gist of how it works. It looks a lot like inittab. # load syslog syslog:2345:echo "Starting syslogd"; /usr/sbin/syslogd -m0:echo "Stopping syslogd"; killall syslogd klog:2345:echo "Starting klogd"; /usr/sbin/klogd:echo "Stopping klogd"; killall klogd # network interfaces, etc. netif:345:/etc/rc.d/network start:/etc/rc.d/network stop # now sync up the time and start ntpd ntp:345:echo "Starting ntp"; /usr/bin/ntpdate -s timeserver; /usr/bin/ntpd:echo "Stopping ntp"; killall ntpd named:345:echo "Starting named"; /usr/sbin/named -u named:echo "Stopping named"; killall named #start inetd inetd:345:echo "Starting inetd"; /usr/sbin/inetd:echo "Stopping inetd"; killall inetd # ftpd proftpd:345:echo "Starting proftpd"; /usr/sbin/proftpd:echo "Stopping inetd"; killall proftpd # start sshd sshd:345:echo "Starting sshd"; /usr/sbin/sshd:echo "Stopping sshd"; killall sshd # start postfix postfix:345:echo "Starting postfix"; /usr/sbin/postfix start:echo "Stopping postfix"; /usr/sbin/postfix stop # start cron cron:2345:echo "Starting cron"; /usr/sbin/crond > /var/log/cron.log 2>&1:echo "Stopping cron"; killall crond # start apache apache:345:/usr/apache/bin/apachectl start:/usr/apache/bin/apachectl stop ############## # the following shutdown entries MUST be at the end of this file! ############## # halt will do nothing in other runlevels but the shutdown one halt:0:/etc/rc.d/rc.halt: # reboot will do nothing in other runlevels but the reboot one reboot:6:/etc/rc.d/rc.reboot: