/etc/rc*.d
/etc/rc0.d – /etc/rc6.d contain the init scripts for each respective runlevel
generally symlinks into the actual files under /etc/init.d
the init scripts in these directories will have special names assigned to them that start with S(start), K(kill) or D(disable) and then a number
when init enters a runlevel, it runs every script that beings with a K in numerical order and passes the stop argument, but only if the corresponding init script was started in the previous runlevel. then init runs every script that begins with S in numerical order and passes the start argument.
init ignores any scripts that start with D, this allows you to disable a script in a particular runlevel, or you could remove a symlink
EX: if you have two scripts, S01foo and S05bar, init would run S01foo first
/etc/rcS.d – all of the system init scripts that init runs at startup before it changes to a particular runlevel. if one of these scripts stall it could prevent you from entering single-user mode.
/etc/rc.local – a shell script set aside for the user to edit. executed at the end of the init process
Last updated
Was this helpful?