SYSMERGE(8)             OpenBSD System Manager's Manual            SYSMERGE(8)

NAME
     sysmerge - update system configuration files

SYNOPSIS
     sysmerge [-ab] [-s src | etcXX.tgz] [-x xetcXX.tgz]

DESCRIPTION
     sysmerge is a sh(1) script designed to help the administrator update con-
     figuration files after upgrading to a new release or snapshot.  The con-
     figuration files are typically those held in /etc, though sysmerge is al-
     so able to update files held in /dev, /root, and /var.

     It is HIGHLY recommended to back up the /etc directory before running
     this script.

     sysmerge works by comparing a temporary reference root directory against
     currently installed files.  The reference files are created from a cvs(1)
     source tree or a ``.tgz'' release or snapshot file.  The default, if no
     source is specified on the command line, is to use /usr/src.  All work is
     done under ${TMPDIR}/sysmerge.XXXXX (known as the work directory).  The
     temporary root directory temproot is created under the work directory.
     Each modified and/or replaced file is saved under the backup directory
     inside the work directory.

     To make sure configuration files are in sync with the actual binaries,
     use the same source as was used to upgrade the system: /usr/src when up-
     grading from source; etcXX.tgz and xetcXX.tgz when upgrading from binary
     sets.

     When run in automatic mode (-a), sysmerge will skip files with identical
     CVS Id, install missing ones and run commands associated with the follow-
     ing special files if they were modified: aliases(5), login.conf(5),
     MAKEDEV(8), passwd(5).  In manual mode (the default unless -a is speci-
     fied), sysmerge will perform a strict comparison of files.  /etc/fbtab,
     /etc/login.conf, /etc/sysctl.conf, and /etc/ttys are created using helper
     scripts and will always be strictly compared even in -a mode.

     sysmerge will work through the fileset, offering the chance to merge any
     differences using sdiff(1).  Files may also be left to deal with at a
     later date.  Should any problems occur, such as a failure to upgrade a
     file, the user will be notified and have to deal with the issue by hand.

     Files and directories can be excluded from comparison by listing them in
     the file /etc/sysmerge.ignore, each entry separated by white space or a
     new line.  The following files will always be skipped from comparison:
     /etc/*.db, /etc/mail/*.db, /etc/passwd, /etc/motd, /etc/myname,
     /var/mail/root.

     The sendmail(8) configuration files /etc/mail/localhost.cf,
     /etc/mail/sendmail.cf and /etc/mail/submit.cf will always differ because
     they include their build date and directories.  A special test was added
     to handle this and they are offered for comparison only if they really
     differ.

     sysmerge will finish by running mtree(8) to make sure the directory
     structure has correct permissions.

     The options are as follows:

     -a      Automatic mode.  If this option is specified, sysmerge will auto-
             matically install missing files, create databases and device
             nodes, and will disable strict file comparison when possible (us-
             ing CVS Ids).

     -b      Batch mode.  If this option is specified, sysmerge will run unat-
             tended (non-interactively), saving differing files for later man-
             ual processing.

     -s src | etcXX.tgz
             Specify a path to an OpenBSD top src directory or an etcXX.tgz
             tarball.  A tarball path specified as an FTP or HTTP URL will be
             passed to ${FETCH_CMD}.

     -x xetcXX.tgz
             Specify a path to an xetcXX.tgz tarball.  A tarball path speci-
             fied as an FTP or HTTP URL will be passed to ${FETCH_CMD}.

ENVIRONMENT
     DESTDIR     Directory in which to merge and install files.  If unset,
                 this defaults to /.

     FETCH_CMD   Command used to fetch remote files.  Defaults to ftp(1).

     TMPDIR      Directory in which the work directory is created.  If unset,
                 this defaults to /var/tmp.

FILES
     ${TMPDIR}/sysmerge.XXXXX     Default work directory.  The temproot and
                                  backup directories are created relative to
                                  this.
     /etc/sysmerge.ignore         Files and directories to ignore from compar-
                                  ison.

SEE ALSO
     cap_mkdb(1), diff(1), mktemp(1), more(1), sdiff(1), MAKEDEV(8), mtree(8),
     newaliases(8), pwd_mkdb(8)

     /usr/src/etc/Makefile

     http://www.openbsd.org/faq/current.html
     http://www.openbsd.org/faq/upgradeXX.html

HISTORY
     The sysmerge script first appeared in OpenBSD 4.4.

AUTHORS
     The sysmerge shell script was written by Antoine Jacoutot
     <ajacoutot@openbsd.org> using FreeBSD mergemaster written by Douglas
     Barton <DougB@FreeBSD.org> as a base.

OpenBSD 4.4                      July 4, 2008                                2
