Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 1995 08:46:16 -0700
From:      patl@asimov.volant.org
To:        syssgm@devetir.qld.gov.au
Cc:        ports@freebsd.org, hackers@freebsd.org
Subject:   Re: ports startup scripts
Message-ID:  <9509211546.AA22308@asimov.volant.org>

next in thread | raw e-mail | index | archive | help
|>  What do we need run levels for?  As far as I can tell, it's never done me
|>  any good on the System V boxes I've administered.  I want single-user mode
|>  for serious system munging, and multi-user mode for everything else.  The
|>  rest is useless crap.  If, say, cron is spinning madly out of control and you
|>  want it shut off, is there a run level for that?  Nope.  You just kill it
|>  and restart it when you feel like it.  What if the printer daemon has hung.
|>  No run level for that either.  It adds no value.

First, BSD has run levels.  Ok, there's only two - single user and multi;
but there are two.  Second, most of the time, you are right - single user
and full multi-user, with the network servers and clients going are the
two most commonly used run levels.  But the other levels can be -very-
useful to the sysadmin during various less-common operations.  (Say,
when recovering from some problem.  It multi-without-network allows the
use of X11 for multi-windowing while working on a problem that may
prevent full network access; or for which you need to ensure that there
are no outside influences while you are working.)

|>  All those fiddly little scripts give me the irrits too.  Half of them run
|>  'ps' in a reckless manner on shutdown in a hope-I-got-it-right attempt to
|>  find the server they want to kill.  Some do that on startup too!

That's just lack of cooperation by the servers.  Easily fixed by having
the servers write a .pid file on startup.  (The scripts should then use
'ps -p ...' to verify that if there is a running process with that number,
it is the expected service.)

|>  They are a feeble attempt at enabling and disabling services.  If we want
|>  that sort of thing, let's build some sort of super-server (like init or
|>  inetd) to look after them properly (plus some system admin tool to flip
|>  them on and off, and maybe keep track of dependencies on other servers).
|>  Let's not embrace this particular bit of System V.

Can you say KISS ?

|>  And back to the real problem: how to start services that not everyone has
|>  installed.
|>  
|>  I see nothing at all wrong with pkg_add editing something like /etc/rc.ports
|>  and having /etc/rc.ports run from /etc/rc.

I see something wrong with install scripts editing -anything-.  It is
orders of magnititude safer to simply copy a new script file into a
subdir.

|>                                              If you want a read-only root
|>  filesystem, symlink /etc to some place writable first, then carry on.  You
|>  want /etc to be read only?  How do you get anything done?  No one adds users
|>  or changes passwords?  No alias file updates?  You must have built a custom
|>  /etc to still be enjoying your life, so add a symlink from /etc/rc.ports to
|>  /var/some/thing or /usr/local/whatever while you are at it.  You must have
|>  *SOME* writable directories if you expect ports to load! :-)

I don't think this is particularly related to wanting to make things
read-only.

|>  Let's keep this as simple as we can.  All these grand schemes for hoards
|>  of shell scripts called from 'for' loops make me nervous.  Is it safer in
|>  one of the other BSD camps?  (Only kidding guys!  No rocks!  Oww!) 

That makes you nervous, but install scripts editing system control
files doesn't?




-Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9509211546.AA22308>