Subject: Re: The new rc.d stuff...
To: Secret Asian Man <>
From: Brett Lymn <>
List: current-users
Date: 04/06/2000 20:19:38
According to Secret Asian Man:
>What kind of argument is this? If your system screws up, there's always
>single user mode. 

I think the point more was that if you screw up the script then that
particular service is hosed not the rest from then on in.  If you have
a monolithic script and you screw up your "'s then _nothing_ happens
from the point of the screw up on.  If you have separate files then
just that service will not run - it may be a critical one so you may
still need to go single user to fix it but chances are the damage will
be limited.

>Frankly, I'm tired of all these systems of initalization
>that think modularity and abstraction are ways of achieving godliness,
>because they aren't. Sure, isn't it fun to start and stop processes using
>cute little scripts?

Fun, no not fun but just imagine your /var/spool/mqueue has just been
filled with an absolutely huge mail file someone is trying to send
out.  Is it easier to tell someone to:

a) run /etc/init.d/sendmail stop and then rm the big file in
  /var/spool/mqueue, run /etc/init.d/sendmail start.

b) type "kill -KILL `cat /var/run/`", rm the file and then
   type /usr/sbin/sendmail -bd -q1h

Try talking someone through both on a mobile phone next to a busy road
and see which is more likely to succeed.  You get extra points if the
person knows the difference between a back-tick and a single quote.

Having a small script that starts just one service can be a real boon
if, for example, the daemon dies you can just run the script again to
start the process.  Or if you need to tweak the config and the daemon
is one that needs restarting, the script makes it quick and easy to
stop & start the daemon without having to trawl the monolithic
rc.local file for the command line args.

> But don't we have pid files?

Which don't mean a thing when you type shutdown, you end up crafting
your own shutdown scripts to shut things down properly before the
system goes down.  Do you think an Oracle database takes kindly to
getting hit with a HUP signal and then being clobbered by a KILL a
little while later?  If that is too high faluting for you, what about
squid? (I can tell you it does not appreciate it too much) _If_ you
set up the rc scripts properly you can ensure all your services shut
down in a controlled manner, this is something that has been lacking
in the BSD world for a long time.

>I think a call for any system to join the 90s is kind of dubious,
>especially for NetBSD, since on a system based upon correctness, I find
>this to be a very messy solution.

OK - design a better one.  Write a paper about it.  Become famous.

>Forward? To what? To runlevels? You're scaring me.

Feh - you have two at the moment, Single user and multi-user.

Brett Lymn, Computer Systems Administrator, BAE SYSTEMS