Pages

Thursday, April 6, 2017

About /etc/rc* Files

1) Folder- /etc/rc.d/rc[0-6].d 

Folder which will have the scripts to run at respective run level. 

2) File - /etc/rc.d/rc.sysinit 

Run once at boot time

a) Sets Hostname 
b) Enables Swap 
c) Sets the environment path, etc...

rc.sysinit seems to be redhat specific and is executed very early in the process. It is executed as one of the first scripts while rc.local is executed later.



3) Folder - /etc/rc.d/init.d/

Folder will have the scripts used by S & K files present in /etc/rc.d/rc*.d/. Eg to Start sshd at boot S55sshd -> ../init.d/sshd for a file in rc3.d the source file will be present in init.d directory. 

4) File - /etc/rc.d/init.d/functions

This file contains functions to be used by most or all shell scripts in the /etc/init.d directory.

5) File - /etc/rc.d/rc.local 

This script will be executed *after* all the other init scripts. You can put your own initialization stuff in here i

rc.local is used to be able to execute additional commands during the startup without having to add symlinks. 

6) File - /etc/rc

This file is responsible for starting/stopping services when the runlevel changes. 

No comments:

Post a Comment