[TriLUG] rc.shutdown on a CentOS system

Jym Williams Zavada trilugj at jrwz.net
Mon Aug 19 22:44:58 EDT 2013


Brian,

>From what you've written, you've followed the time-honoured method for 
adding a custom local init script in the SYSV init environment.  Although 
"right/good" depends on the context, among many other factors, as a 
Linux/Solaris/*BSD/etc sysadmin working in the trenches for some 10-odd 
years or so, my opinion is that you've done well.  You should be aware, 
though, that other init environments exist.  The two traditional ones are 
BSD (no /etc/inittab, no runlevels, etc.) and SYSV (/etc/inittab, runlevels, 
etc.).  In recent years, there has been movement away from these two, for 
various reasons.  For example, Solaris now uses smf (Service Management 
Facility), MacOSX uses launchd, and Ubuntu uses Upstart, and there are 
others.  But quite a number of Linux distros, with RedHat/CentOS (as far as 
I am aware, stil) among them, still use SYSV init.  As far as documentation 
for such goes, I recommend taking a gander at the Linux Standards Base 
specification regarding system initialization, if you're interested in 
learning more:

http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/tocsysinit.html

And my take on the newcomer replacements for init is that they are being 
created to fulfill a valid need.  However, because each one differs in how 
it works and is configured, it does cause sysadmins some consternation, as 
we now have several different ones to know, understand and support, instead 
of minor variations of the traditional two.  On the brighter side, though, 
the more I know about them all, the better my job security. :)

-Jym Williams Zavada

On Mon, 19 Aug 2013 at 14:29, Brian Henning wrote:

> What I've done is create /etc/rc.d/rc.shutdown, symlinked it in /etc, and
> created symlinks to it in rc0.d and rc6.d called K00local (similar to the
> S99local links in the other rcN.d directories).  It all seems to work.
>
> My question is, was this a right/good way to achieve what I want, or is
> there some other mechanism that I should be using?
>
> Thanks!
> ~B


More information about the TriLUG mailing list