[TriLUG] rc.X -- how do the real sysadmins do it?

Ryan Leathers ryan.leathers at globalknowledge.com
Fri Dec 5 09:12:16 EST 2003


Ben,

Thanks for the clearly stated thoughts.  Explanations are always more
valuable than one-liners and I appreciate your time in crafting a
thoughtful response.

On Wed, 2003-12-03 at 14:10, Ben Pitzer wrote:
> The *nix SysV standard, to which most Linux distros adhere, is to place the
> actual init script in the /etc/init.d directory, then symlink in the
> appropriate rc?.d directory to the file in /etc/init.d.  BSD, on the other
> hand, uses the original Unix style, now commonly referred to as BSD init
> scripting, which is to place all of the startup information in a single
> file, called rc?.d.  My personal preference is the SysV style, as it does
> allow for better process management on an individual service-to-service
> level.  I'd rather run '/etc/init.d/servicename stop' than 'kill <pid>' to
> stop a process.  Now, many of you out there are fans of the 'service'
> command.  I have nothing against it, I suppose, but I learned many moons ago
> where the init scripts live, and how to use them, and I'm more of a fan of
> doing that.
> 
> Now, insofar as actually deleting the files in the /etc/rc?.d directories
> goes, I'm against it on the simple basis that sometimes different software
> manufacturers and package maintainers will place actual scripts in the rc?.d
> directories, rather than symlinks.  Deleting these would be quite bad, as it
> means that they wouldn't be there later in case you want to re-enable the
> service.  Additionally, someone suggested using a lower case 's' instead of
> the standard uppercase 'S' in the script/symlink name.  This doesn't work on
> some distros, as any 's', upper or lowercase, is recognized.  Finally, by
> adding norun. onto the beginning of the script/symlink name in the rc?.d
> directory, you preserve everything about the file, without changing either
> it's original form, or creating any confusion about that service's initial
> configuration.  norun.S99svcname is quite obviously a service that was
> scheduled to start after all other services, but has been disabled.
> K99svcname might confuse future admins into thinking that the service was
> never supposed to run, which is another reason why I'm somewhat (yes, I can
> think of both arguments, and I'm still somewhat...) opposed to using
> 'service' to turn init scripts on or off.
> 
> My methodology, which I learned from some highly experienced sysadmins over
> the years, has advantages in that it leaves no confusion as to the original
> intention of the script, and leaves the script available to be re-enabled at
> any time the admin chooses using a simple 'mv' command.  Sometimes it's not
> just about making it easy, but also making it clearly recognizable.
> 
> Again, my $0.02, but my advice, Ryan, is to choose whichever setup works
> best for your situation, as always.
> 
> Regards,
> Ben Pitzer
> 
> ---------------------------------------------
> 
> "Those that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety."
>  --Ben Franklin--
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: trilug-bounces at trilug.org [mailto:trilug-bounces at trilug.org]On
> > Behalf Of James Manning
> > Sent: Wednesday, December 03, 2003 10:28 AM
> > To: Triangle Linux Users Group discussion list
> > Subject: Re: [TriLUG] rc.X -- how do the real sysadmins do it?
> >
> >
> > > On some systems  it is common to have all the scripts in /etc/init.d
> > > and just have links in /etc/rc?.d. So to remove something just remove
> > > the link in /etc/rc?.d, but not the original in /etc/init.d. This give
> > > you the ability to start/stop manually but not when changing run
> > > levels.
> >
> > I'm kinda curious - on which Linux-based systems is this not the case?
> > I ask only because my experience is limited to Debian and RHL kinds of
> > distros (well, outside of SLS and Slackware way back in the day, but
> > I've forgotten all that now) which do the symlink thing so I'm curious
> > :)
> >
> > The symlinks are important since the name of the symlink determines
> > the start-up order (that parallel-start init would be nice with its
> > "better" dependencies).  I miss RHL's chkconfig on my Debian systems
> > for that reason - nothing about the service "knows" which number it
> > should start/stop at, so while update-rc.d with "defaults" as the
> > param is usually ok, it's not an always-works kind of thing like
> > "chkconfig foo on" would be.
> >
> > --
> > James Manning <http://www.sublogic.com/james/>
> > GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4
> > --
> > TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> > TriLUG Organizational FAQ  : http://trilug.org/faq/
> > TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> > TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
> >
-- 
Ryan Leathers <ryan.leathers at globalknowledge.com>
Global Knowledge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20031205/54b4b015/attachment.pgp>


More information about the TriLUG mailing list