README for initfuncs.sh
=======================

I always disliked the whole bunch of garbage you get when booting your
average Unix machine. Therefore I made this script up, which
is meant to be used by init(8), for the multi-user startup part (it
needs too much things up'n'running for the rc.S script).

The following functions are meant for use by init:

init_add_module <name> <description>

Adds a module to the list of known modules. You should also define a
function do_<name>, which is called when it is the module's turn.
The function must return 0 on success (see below).

init_go

Executes all modules, in the order they where defined. Puts up a list
of modules with the dialog(1) command, and refreshes the module status
in between.

init_panic <message>

Something serious happened :-). A message is put on screen, and the
user will be provided with a login shell. After logging out, the 
script resumes where it started.

Then, there is an environment variable, init_title. This will be used
as the title for the start-up screen.

Error handling
--------------

All modules have stdin and stderr redirected to /tmp/init.<module>.out,
which is removed on successful exit. So, if a user sees ``Fail''
states appearing on screen, all output is in /tmp for him to inspect.

Examples
--------

The rc.* files use initfuncs.sh (I suppose /sbin is a correct place
for it). Look at them and tell me what you think. DON'T DROP THESE
FILES IN AS A REPLACEMENT FOR YOUR SCRIPTS!!! (now you can't say
I didn't warn you).

Copyright
---------

Copyright 1996, OpenLink Group Ltd. This software falls under the
GNU GPL, which I didn't include because it adds to much bloat. Please
see your nearest COPYING file for the details.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   
(or check out prep.ai.mit.edu :-)).


Reactions
---------

Cees de Groot <C.deGroot@inter.nl.net>
