home *** CD-ROM | disk | FTP | other *** search
- RESTART
-
- Instructions for RESTART.COM
-
- This is the second version of the RESTART.COM program that I wrote in
- 1988, one afternoon. It is a somewhat more flexible version.
- I contribute this program to the Public Domain.
-
- Tom Almy
- toma@tekgvs.labs.tek.com
- May 26, 1990
-
- Improvements:
- - commentary text after first line possible
- - more than one config name can be given
- - more and more instructive error messages
- - now white space(s) separate config names from lines to write
- - white space removed around input and output lines
- - empty lines allowed and ignored in configuration file
-
- Thomas Birnthaler
- birnthal@forwiss.uni-erlangen.de
- Aug 25, 1990
-
-
- Improvements:
- - additional config names can be defined based on presence or absence
- of other config names
- - more error messages
- - added cold boot option
-
- Tom Almy
- September 24, 1990
-
-
- DESCRIPTION
- -----------
- Restart is a system configuration management program. The conflicts
- of many device drivers, tsrs, tradeoffs on ramdisks, etc, was driving
- me nuts having multiple CONFIG.SYS and AUTOEXEC.BAT files to maintain
- and copy. Restart maintains all the configurations in a single file,
- CONFIGUR.DAT. This file contains a list of allowable configuration
- names followed by descriptions of the contents of any number of files
- (typically CONFIG.SYS and AUTOEXEC.BAT in the root directory of the
- booting drive, but can also be used for command alias files, altering
- batch files, etc.). The file descriptions are lines to be included in
- the file. Lines can be conditionally included or excluded based on
- the configuration name.
-
- After the files are created, restart can reboot the system. A time
- delay can be specified for systems using staged-write disk caching.
- Other options disable the reboot, or writing what would be the file
- contents to the display rather than to the files (for debugging).
-
-
- THE COMMAND LINE
- ----------------
- RESTART
-
- with no arguments gives a short message on the allowed arguments,
- a list of all possible configurations, and all the (commentary) text
- before the first *filename in CONFIGUR.DAT.
-
-
- RESTART <config> ...
-
- will create files for configuration(s) "<config> ...", and then reboot the
- system. More than one configuration is allowed.
-
-
- RESTART -n <config> ...
-
- same, but won't reboot the system.
-
-
- RESTART -c <config> ...
-
- same, but does cold reboot, like when powered up, rather than warm (soft)
- reboot, like ctrl-alt-delete.
-
-
- RESTART -s <config> ...
-
- writes what would be the file contents for configuration(s) "<config> ..."
- to standard output (you might want to pipe the output through MORE).
-
-
- RESTART -4 <config> ...
-
- delays four seconds before rebooting (any integer delay, in seconds,
- can be specified).
-
-
- THE CONFIGURATION FILE
- ----------------------
- The configuration file, CONFIGUR.DAT, is expected to be found in the
- root directory of the boot drive (It looks at the first character of
- the COMSPEC environment variable to decide which drive is the boot
- drive). If the environment variable BOOTDRIVE is defined, then the
- first character of that variable specifies the bootdrive.
-
- - The first line of the configuration file specifies the allowable
- configurations. Configuration names are separated by apostrophes, and
- apostrophes are used at the beginning and end of the line as well. No
- white spaces or other extraneous characters are allowed. For instance,
- my first line looks like this:
-
- '386'med'noram'small'c++'max'c60'
-
- listing seven possible configurations.
-
- - Zero or more lines of commentary text follow, describing e.g. the
- possible configurations. This commentary text ends before the first
- line specifying a file to generate.
-
- - Zero or more subconfiguration lines (may be mixed with commentary text).
- These lines follow the format of the conditionally included lines
- described below. As an example, the line:
-
- 'a'b' ramdrive
-
- will define the configuration ramdrive if either configuration a or
- configuration b have been defined. This allows the use of 'ramdrive'
- rather than 'a'b' in conditional lines, and can be more descriptive.
-
- - At least one line must specify a file to generate. Lines
- specifying files start with an asterisk. File names need to be
- specified with full drive and pathnames. My first file line is:
-
- *c:\config.sys
-
- The lines that follow, up until the next file specification line or
- end of file, describe the lines which go into that file.
-
- - If a line starts with a list of one or more configurations, followed
- by one or more white spaces, then that line is only included for those
- configurations. For instance,
-
- 'noram'small' shell=c:\4dos.com /s:dc:\temp /p
-
- The line starting at "shell" is only placed into the file if the
- configuration is noram or small.
-
- - A line that starts with a tilde is handled in the same manner, but
- with the sense reversed. For instance,
-
- ~'noram'small' shell=c:\4dos.com /s:dk: /p
-
- is only placed in the file if the configuration is not noram or
- small. In this case, it would be equivalent to:
-
- '386'med'c++'max'c60' shell=c:\4dos.com /s:dk: /p
-
- - By having a line that cannot match any configuration, you can have
- comment lines in the CONFIGUR.DAT file:
-
- '' THIS IS A COMMENT LINE
-
- - A line that starts with neither * ' nor ~ is always written
- to the file.
-
- - Empty lines are skipped, leading and trailing white space is removed
- from input and output lines.
-
-
- Here is a small sample CONFIGUR.DAT file:
- -----------------------------------------
- 'clean'small'large'
- commentary text
- clean: maximum free memory
- small: small system
- large: large system
-
- ~'clean' notclean
-
- *c:\config.sys
- 'notclean' driver=\sys\mouse.sys
- 'large' driver=\sys\fastdrive.sys 1024
- 'large' buffers=5
- ~'large' buffers=10
-
- *c:\autoexec.bat
- 'large' pcshell/r
- 'notclean' neattsr/p/q
- PATH=\bin;\dos
-
-