README for cfgtool.
-------------------

cfgtool manipulates "system configuration variables".

A "system configuration variable" might be, for example, how long
files are kept in /var/tmp.

Example of use
--------------

The current /etc/init.d/boot contains the following snippet:

	# Time files in /tmp are kept.
	TMPTIME=0
	# Set to yes if you want sulogin to be spawned on bootup
	SULOGIN=no
	# Set to no if you want to be able to login over telnet/rlogin
	# before system startup is complete (as soon as inetd is started)
	DELAYLOGIN=yes
	# Set GMT="-u" if your system clock is set to GMT, and GMT="" if not.
	GMT="-u"

This could be written as:

	TMPTIME=`cfgtool --get boot.tmptime`
	SULOGIN=`cfgtool --get boot.sulogin`
	DELAYLOGIN=`cfgtool --get boot.delaylogin`
	GMT=`cfgtool --get boot.cmos-is-utc`

When the base system is installed, it would run the following commands:

	cfgtool --create boot.tmptime 0
	cfgtool --create boot.sulogin no
	cfgtool --create boot.delaylogin yes
	cfgtool --create boot.cmos-is-utc $answer

The answer to the last one needs to be asked from the user.

Some variables that might be created (based on my /etc/init.d,
/etc/cron.daily, and other things):

	boot.tmptime
		files at least this old (in days) are deleted from 
		/tmp at bootup
	boot.sulogin
		start sulogin on console at boot?
	boot.delaylogin
		should (network) logins be disabled until boot
		process is finished?
	boot.cmos-is-utc
		is the hardware clock set to UTC?
	kerneld.options
		options to give kerneld upon startup/shutdown
	syslogd.options
		options to give syslogd upon startup/shutdown
	klogd.options
		options to give klogd upon startup/shutdown
	x11.run-xdm
		should xdm be started at bootup?
	x11.configured
		has x11 been configured?
	x11.run-xfs
		should xfs be started upon bootup?
	find.fs-include
		filesystem types to include when running updatedb
		(include everything, if this is empty)
	find.fs-exclude
		filesystem types to exclude when running updatedb
	find.path-exclude
		list of directories to exlude when running updatedb
	man.max-cache-read
		remove catman pages that have not been read in this
		many days
	man.max-cache-modified
		remove catman pages that have not been modified in this
		many days

Copying a configuration
-----------------------

The --list-all outputs a special file that contains all variables
and their values. It is read by --create-all or --set-all. This
is used to copy a configuration to a new machine. --create-all just
creates the variables; if a variable already existed, it is not
set. --set-all also sets it.

Help files are not copied. When the respective packages are installed
on the target machine, the help files will also be installed.

Example of copying:

	# install base system on remote machine, then:
	cfgtool --list-all | ssh otherhost cfgtool --create-all
	# then use dselect or whatever to install all the desired
	# packages; the postinst scripts will use the values from
	# the newly initialized repository

-- 
Lars Wirzenius, http://www.iki.fi/liw/mail-to-lasu.html
