*** README *** 2004-04-13 *** README for VCinit v1.x ***
This is a 'virtual console only init'. Although this 'init' is more or less SYSV compatible, the boot policy is entirely new and cannot be considered as a drop in replacement for sysvinit and compatibles.
VCinit is suitable for small and home systems manually tuned, so the boot procedure can be simplified and a is bit faster. That is, it works for me and I like it, so if you don't like it, just don't use it ;)))
Keep on reading for installation instructions, or read 'doc/vcinit.txt' for usage instructions (not highly detailed by now, but they do).
Building and installing VCinit
This init clone uses the MOBS building system, quite similar to GNU configure (autoconf/automake). If you want to learn how to use the full power of MOBS (through the '0' script), read the '0.README' file. Anyway you won't need all that power to install VCinit ;)) If you want to see a quick help, do './0 --help'.
The first thing for building is configuring VCinit, using the '0' script in the project's root directory. If you want to install it in the default prefix (/usr/local), just run './0', but since you usually want the 'init' binary under /sbin/init and not under /usr/local/sbin/init, you should pass '--prefix=/' to the '0' script. This will install the init binary under '/sbin/init', and will use defaults for all options.
The directory options you can pass to '0' that affect VCinit are:
--prefix=PREFIX
Will set the installation prefix to directory PREFIX. --sbindir=SBINDIR
Will install the 'init' binary on 'SBINDIR/init'. By default,
this is 'PREFIX/sbin'.
--confdir=CONFDIR
Will set bootup script to 'CONFDIR/bootup', shutdown script to
'CONFDIR/shutdown' and issue file to 'CONFDIR/issue'. By default
this is 'PREFIX/etc'.
--docdir=DOCDIR
Will install documentation in directory 'DOCDIR/vcinit/'. This
directory is by default 'PREFIX/doc/vcinit/', except if PREFIX
is the root directory ('/'); then it is '/usr/doc/vcinit/'.
Please note that all directories you specify are relative to the root directory, so if you specify './0 --prefix=somedir --datadir=anotherdir', you are saying that the prefix is '/somedir/' and that the datadir you want is '/anotherdir/', not '/somedir/anotherdir'. If you want that, you must call the '0' script as './0 --prefix=somedir --datadir=somedir/anotherdir'. You don't need to be very careful about the slashes, since the script will normalize the directory names so they always start with a slash (you know, root relative) and end with a slash, too. Just remember to quote from the shell any special character.
In addition to the directory options, VCinit supports the following '--with' options to change its configurable items:
--with-BOOTUP_PATH=PATHNAME
Sets the name of the bootup script to PATHNAME.
Default is 'CONFDIR/bootup'.
--with-SHUTDOWN_PATH=PATHNAME
Sets the name of the shutdown script to PATHNAME.
Default is 'CONFDIR/shutdown'.
--with-ISSUE_PATH=PATHNAME
Sets the name of the login beautifier file to PATHNAME.
Default is 'CONFDIR/issue'.
--with-LOG_PATH=PATHNAME
Sets the name of the log file to PATHNAME.
Default is '/var/log/messages'.
--with-LOG_LSIZE=BYTES
Sets the maximum size of a log line to BYTES.
Default is 1024 bytes.
--with-UTMP_PATH=PATHNAME
Sets the name of the UTMP file to PATHNAME.
Default is system dependent (usually '/var/run/utmp').
--with-WTMP_PATH=PATHNAME
Sets the name of the WTMP file to PATHNAME.
Default is system dependent (usually '/var/log/wtmp').
--with-INIT_TERMS=N
Sets the number of virtual terminals to N (between 1 and 9).
Default is 9 virtual terminals.
If you don't know what is an option, doesn't change it ;)) Please note that the options '--confdir', '--with-BOOTUP_PATH', '--with-SHUTDOWN_PATH' and '--with-ISSUE_PATH' will affect where VCinit looks for its files. Well, the '--with' options take precedence over '--confdir', so you can, for example, put the bootup and shutdown scripts in '/etc/', but the issue file under '/usr/lib/issue', just by calling the '0' script like this:
./0 --prefix=/ --with-ISSUE_PATH=/usr/lib/issue
If the package has been succesfully configured, you can type 'make' or 'make all' for building it, and 'make install' for installing it. That's all. If you want to remove the files created by the building process in order to have a clean environment to rebuild, just run 'make clean'.
The command 'make install' outputs (to stdout) a list of the installed files (the full path of each one) so you can track down what is doing the installation with your system in case you install the program as root ;)
Please note that you cannot (safely) install the new 'init' binary over the existing and running one. The recommended practice is to do, as root, 'mv /sbin/init /sbin/init~' (or whatever name you want for the saved init), and afterwards do 'make install'. This assumes that you provided '/' as the prefix.
Remember to add execution permission to the bootup and shutdown scripts, or VCinit won't be able to run them ;))))
Acknowledgments
Although this code has been written entirely from scratch, it wouldn't have been possible without the sysvinit package, by Miquel van Smoorenburg <miquels@cistron.nl> and others, which has been the reference for me while writing this crap :)) The book 'Advanced Programming in the Unix Environment' has been of great help too, specially regarding the process family issues. And, as always, David Gómez Espinosa did a great work testing the program, helping to find bugs, etc... Thanks a lot :)
The klogd emulator has been written from scratch too, but taking as a reference the code from sysklogd package, by Steve Lord <lord@cray.com> originally, now maintained and heavily modified by Dr. G. W. Wettstein <greg@wind.rmcc.com>. The code from glibc-2.2.4 was of help here too. Thanks a lot to all of you. Without people like you, writing good free software, VCinit wouldn't have been possible. I have typed the code, but you have lend me your brains. Thanks, truly.
Report bugs, suggestions and doubts to me ;)
Raúl Núñez de Arenas Coronado <raul@pleyades.net>
