Forum OpenACS Q&A: Response to postgresql reboot script

Collapse
Posted by Jonathan Ellis on
By "trying telinit" I meant, change to the different runlevels and see if the postgres start script gets executed.  Telinit will call the S scripts in the rcX.d level you are entering, and the K scripts in the level you are leaving.  By convention the most common runlevels are runlevel 1 = single user mode, 3 = networked mode, 5 = networked with X, 0 = halt, 6 = reboot.  Man telinit for details.

/etc/inittab controls what gets executed; on redhat this calls /etc/rc.d/rc with the runlevel number, which handles going through the rcX.d directory and calling the scripts.  Lower numbers get called first.

init.d is totally ignored by this.  As a convention, people put the "real" script in init.d and symlinks to it in the rcX.d directories corresponding to the runlevels they want it in.  E.g. you may not want to bother starting postgres when you are in runlevel 1.