(do-patch Usage at the end of this file)

The do-patch script requires the following structure
($install is the root of the install scripts directory, at our site it's
/opt/install.  By default do-patch uses the patches subidrectory
of where do-patch lives.


 $install/do-patch		- the do-patch script.
				  pathname used to locate rest of files.
 $install/patches		= $patchroot
 $patchroot/`uname -r`		- directory where patch.tar.Z files live
 $patchroot/`uname -r`/alt	- alternate directory.  Used here to exclude
				  certain patches from being rdist'ed.
 $patchroot/patchlist.server	- list of patches for server.
				  [ <patchid>-<rev>, one per line ]
 $patchroot/patchlist.common	-  list of patches for normal machines
 $patchroot/patchlist.`uname -n`.add
				- list of additiona patches for a specific host
 $patchroot/patchlist.karch	- list of additional patches for a specific
				  kernel architecture

 $patchroot/patchlist.<class>	- list of patches for a certain class, e.g.,
				  DATALESS.  Overrides common and server.
 $patchroot/patchlist.<pkg>	- list of patches to be added for machines
				  that have a certain pkg installed.
				  E.g., patchlist.SUNWowrqd will be installed
				  only on systems with SUNWowrqd installed.

If present, do-patch will also use:

 $install/fastpatch		- perl script that will remove the outdated
				  patch directories of patches that have
				  been obsoleted and can't be backed out.
				  (I.e., no old files saved.)
				  And also backs out patches that are in
				  the "also obsoleted" category using
				  backoutpatch.

				  If perl isn't in /usr/local/bin
				  or /usr/bin, you'll need to edit
				  the PATH in the do-patch script.
				  Used instead of backoutpatch if old patch
				  data wasn't saved.

  $install/fix-modes	        - fix file modes to more secure
				  fashion (part of auto-install stuff)

				  Also change file owner ship.

    In the patch directories the following files exist:

	<patchid>.tar.Z	-	the patch tar file, must contain
				patch files in directory <patchid>
	<patchid>.pre		commands executed before installpatch is run
				(optional)
	<patchid>.post		commands executed after installpatch is run
				(optional)
				Note: the existance of this file will
				override the default reboot action,
				a line of the form:
				: ${reboot:=true}
				restores this default behaviour.

	The .pre ad .post script are executed inside the do-patch
	shell.



One admittingly broken feature is the ``server'' feature.
On servers, the old files are saved.  On other hosts the old
files aren't saved.  The way this ``serverness'' is detected is
even more broken: server are hosts with their own /opt and hosts
where do-patch is executed as ``do-patch.server''.

Usage: do-patch -s -c -k -n -d -- <installpatch args>.

	-k	don't execute any actions other than installing the patch.
	-n	don't reboot, but execute pre and post actions.
	-d	tells which patches would be installed.
	-s 	use patchlist.server and save old files [server]
	-c	use patchlist.common don't save old files [client]

	-R dir	Install patches under directory <dir>, i.e., pass
		-R dir to installpatch, fastpatch and fix-modes.

Casper
