|
NAMEmergemaster —
merge configuration files, et al during an upgrade
SYNOPSIS
DESCRIPTIONThemergemaster utility is a Bourne shell script which
is designed to aid you in updating the various configuration and other files
associated with FreeBSD. It is
HIGHLY recommended that you back up your
/etc directory before beginning this process.
The script uses /usr/src/Makefile to build
a temporary root environment from / down, populating
that environment with the various files. You can specify a different source
directory with the By default it creates the temporary root in
/var/tmp/temproot and compares the Version Control
System (VCS) Id strings ($FreeBSD) for files that have them, deleting the
temporary file if the strings match. If there is no Id string, or if the
strings are different it compares the files themselves. You can also specify
that the script ignore the Id strings and compare every file with the
The merge menu option is designed to let you easily combine your customizations from the old version of a file into the new one. While you can use the merge function to incorporate changes from files that you have not customized, it is not recommended. The The script uses the owner and group ids that the files are created with by /usr/src/etc/Makefile, and file permissions as specified by the umask. Unified diffs are used by default to display any differences unless you choose context diffs. The When the comparison is done if there are any files remaining in
the temproot directory they will be listed, and if the
The options are as follows:
ENVIRONMENTThemergemaster utility uses the
PAGER environment variable if set. Otherwise it uses
less(1). If
PAGER specifies a program outside its limited
PATH without specifying the full path,
mergemaster prompts you with options on how to
proceed. The MM_PRE_COMPARE_SCRIPT and
MM_EXIT_SCRIPT variables are used as described above.
Other variables that are used by the script internally can be specified in
.mergemasterrc as described in more detail below.
FILES
The # These are options for mergemaster, with their default values listed # The following options have command line overrides # # The target architecture (-A, unset by default) #ARCHSTRING='TARGET_ARCH=<foo>' # # Sourcedir is the directory to do the 'make' in (-m) #SOURCEDIR='/usr/src' # # Directory to install the temporary root environment into (-t) #TEMPROOT='/var/tmp/temproot' # # Specify the destination directory for the installed files (-D) #DESTDIR= # # Strict comparison skips the VCS Id test and compares every file (-s) #STRICT=no # # Type of diff, such as unified, context, etc. (-c) #DIFF_FLAG='-u' # # Install the new file if it differs only by VCS Id ($FreeBSD, -F) #FREEBSD_ID= # # Verbose mode includes more details and additional checks (-v) #VERBOSE= # # Automatically install files that do not exist on the system already (-i) #AUTO_INSTALL= # # Automatically upgrade files that have not been user modified (-U) # ***DANGEROUS*** #AUTO_UPGRADE= # # Either always or never run newaliases, pwd_mkdb at the end (--run-updates) #RUN_UPDATES= # # Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf (-C) #COMP_CONFS= # # Preserve files that you replace (-P) #PRESERVE_FILES= #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # # The umask for mergemaster to compare the default file's modes to (-u) #NEW_UMASK=022 # # The following options have no command line overrides # # Files to always avoid comparing #IGNORE_FILES='/etc/motd /etc/printcap foo bar' # # Additional options for diff. This will get unset when using -s. #DIFF_OPTIONS='-Bb' # Ignore changes in whitespace # # Location to store the list of mtree values for AUTO_UPGRADE purposes #MTREEDB='/var/db' # # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # # Delete stale files in /etc/rc.d without prompting #DELETE_STALE_RC_FILES= # # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= #MM_EXIT_SCRIPT= EXIT STATUSExit status is 0 on successful completion, or if the user bails out manually at some point during execution.Exit status is 1 if it fails for one of the following reasons: Invalid command line option Failure to create the temporary root environment Failure to populate the temporary root Presence of the 'nodev' option in <DESTDIR>/etc/fstab Failure to install a file EXAMPLESTypically all you will need to do is typemergemaster at
the prompt and the script will do all the work for you.
To use context diffs and have # mergemaster -cv To specify that # mergemaster -t
/usr/tmp/root To specify a 110 column screen with a strict comparison, use: # mergemaster -sw 110 SEE ALSOdiff(1), make(1), less(1), sdiff(1), etcupdate(8), pwd_mkdb(8)/usr/src/etc/Makefile Nik Clayton, The Cutting Edge (using make world), https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html. HISTORYThemergemaster utility was first publicly available on
one of my web pages in a much simpler form under the name
comproot on 13 March 1998. The idea for creating the
temporary root environment comes from Nik Clayton's make world tutorial which
is referenced above.
AUTHORSThis manual page and the script itself were written by Douglas Barton <dougb@FreeBSD.org>.
Visit the GSP FreeBSD Man Page Interface. |