r2d2 - reading runlevels 2 dimensional


	r2d2 is an attempt to make administration of SysV-init scripts
	easier for local system administrators. Unix vendors and
	Linux distributions are provided with a complete upgradable
	technique.

	In some way r2d2 combines the easeness of the BSD-style
	scripts (e.g. in Slackware Linux) with the power and
	flexibility of the traditional SysV scripts (e.g. in
	RedHat or S.u.S.E. Linux).

	Furthermore it uses a plugin-concept, which enables
	you to have only two files left for configuring the boot
	process: one that says which daemons should be started
	and one that specifies when (at which runlevel). You
	even get rid of most shell-functions and helper programs
	in init-scripts. Of course r2d2 gives you the freedom
	to use this features or not.
	In any case r2d2 keeps fully compatible to SysV init!

	From the authors point of view, r2d2 is the only consequent
	implementation of the main ideas behind SysV-style init
	sequence: truely upgradable init-scripts and a standarized
	way to configure services.

	r2d2 is documented and ships with a bunch of example scripts,
	which are closely related to the initialization of a Linux
	system.

Status

	The current version of r2d2 is 0.6.2 This is an informal
	release which is neither complete nor finished. Version
	0.5.7 is quite usable and reported to be used in production
	environments.


Historical background

	The traditional "SysV-init" expresses the setup for runlevels
	through	the filesystem. Usally several hundred links somewhere
	under /etc are needed for that. This scheme is neither
	effective nor intuitive, because the filesystem of the
	root-directory is not designed to represent complex
	structures. r2d2 breaks with this messy scheme and
	stores the setup in a single file instead. Of course this
	is fully equivalent and transparent because links in a
	directory are nothing else but rows in a special file.

	Usally the shell-script /etc/init.d/rc evaluates the
	information expressed by the links during boot and runlevel
	switching. "r2d2" is an alternative for the traditional "rc".


Compatibility

	"SysV-init" is just an idea, with different implementations
	by different vendors (Linux distributions). Some Unices use
	hardlinks, some symlinks, some store the links under /etc,
	some under /sbin and some don't even have different runlevels.

	Short: there is no real standard and thus nothing r2d2 could
	be compatible with on the implementation level. It is as
	compatible to SysV init, as all other implementations are.


Requirements

	* init scripts which are controlled by "start" and "stop"
	  parameters

	* /bin/sh installed ;-)

	* some courage to give it a try


Features

	r2d2 supports the following features:

	* configurable search-path for init-scripts
	* ability to pass additional parameters to init-scripts


	Here's an extract from a sample config file:

# This is the configuration file /etc/init.d/runlevel.conf
#
$PATH   -       -	/etc/r2d2:/etc/init.d:/sbin/init.d:/etc/rc.d/init.d
#
#<sort> <off>   <on>	<script>
99      0,1,6   2-5	xdm
99      -       2-5	rmnologin
89      0,1,6   2-5	cron
[..]
12      0,1,6   2-5	kerneld
10      0,1,6   2-5	sysklogd
05      -       6	reboot
05      -       1	single
05      -       0	halt

	One could also write a script to produce similar output but
	this is not satisfactory because it would be another name of a
	program to know and not editable. The syntax of the
	config-file should be fairly obvious, consult the man-page
	r2d2(5) in case of questions. 


First steps

	After unpacking the tar file you may want to try out the
	simple version by issuing the commands

	cd sbin
        ./rclink2file.sh > ../etc/r2d2/runlevel.conf
        export PREVLEVEL=B            # previous runlevel, B = Booting
        ./r2d2-simple 2               # "switch" to runlevel "2"

	You don't need to be root to do this and to be on the save
	side, "r2d2" only prints the commands it would execute.

	IMPORTANT NOTE: if you like r2d2 you should think carefully
	about potential incompabilities with your distribution and
	potential problems with upgrading before you replace the old
	one.


Disadvantages

      * Modifications of runlevel.conf require the whole file to be
	rewritten, which is a source for errors. On the other side
	this is only as bad as with /etc/passwd.

      * Inserting and removing entries is not done via
	"well-understood" utilities like "ln" and "rm". On the other
	hand the scheme with links is not widely understood at all,
	so "ln" and "rm" don't really help.

      * The "sort numbers" are not evaluated by "r2d2".

      * Only very few system administrators (mad or heros?) have
	reported the usage of "r2d2" in a production environment
	to me, so the testbed is very small. 


Advantages

      * You can easily make backups of the config file and use
	standard software like "diff" to compare "working" and
	"not working" configuration files. Try that with a bunch
        of several hundred symlinks.

      * Uses 1 inode instead of several dozens/hundreds and is
	therefore ideally suited for boot-disks.

      * The "sort numbers" are not evaluated by "rc".

      * No special tool required, you can use your favorite editor
        to maintain the configuration manually.

      * The sort-numbers could be replaced by symbolic names.


	Of course even more complicated setups can be expressed in the
	configuration file:

#<sort> <on-> <off-levels>  <script>
15      0       -               foo
17      1       -               foo
19      6       -               foo
14      -       5               foo
80      -       2               foo
84      -       3,4             foo


	The mailinglist for discussion is r2d2@shop.de, which has an
	archive under http://www.shop.de/linux/archives/r2d2. To
	subscribe send an email with the text "subscribe" to
	r2d2-request@shop.de, e.g. by executing

	echo "subscribe" | mail r2d2-request@shop.de

