SYSMERGE(8)

NAME
sysmerge - update system configuration files

SYNOPSIS
sysmerge [-bdp]

DESCRIPTION
sysmerge is a ksh(1) script designed to help the administrator update configuration files after upgrading to a new release or snapshot.

sysmerge works by comparing a temporary reference root directory against currently installed files. All work is done under ${TMPDIR}/sysmerge.XXXXXXXXXX (known as the work directory) which contains the temporary root directory temproot, and the backup directory containing modified and/or replaced files.

sysmerge will work through the fileset, offering the chance to merge any differences using sdiff(1). Merged files may be edited using the default editor or 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 will have to deal with the issue by hand. sysmerge will also compare the checksum of each file stored under /etc/examples against the previous one then warn if it does not match and the corresponding file exists under /etc.

By default (if -d is not used) sysmerge only compares files whose reference sources have changed since the last run and attempts to automatically upgrade them to the newest version, provided that they have no local changes. It automatically installs missing files and binaries, and updates files differing only by CVS Id. Files whose reference sources have matching CVS Id are skipped from comparison. /etc/fbtab and /etc/ttys are created using helper scripts and are always compared. Users and groups that are missing from the current installation but present in the new master.passwd(5) and group(5) files will always be automatically (re)created.

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

The options are as follows:

-b  Batch mode. sysmerge runs non-interactively, saving differing files for later manual processing.

-d  Diff mode. sysmerge does not take any automatic action, allowing for a full diff comparison.

-p  Package mode. sysmerge only compares the default configuration files of installed packages(7) against their target on the system (@sample).

Files can be excluded from comparison by listing them in /etc/sysmerge.ignore. The following files will always be skipped from direct comparison: /etc/group, /etc/localtime, /etc/mail/aliases.db, /etc/master.passwd, /etc/motd, /etc/passwd, /etc/pwd.db, /etc/spwd.db, /usr/share/sysmerge/etcsum, /usr/share/sysmerge/examplessum, /usr/share/sysmerge/xetcsum, /var/db/locate.database, /var/mail/root.

ENVIRONMENT

EDITOR, VISUAL
    Specifies an editor to use. If both EDITOR and VISUAL are set, VISUAL takes precedence. If neither EDITOR nor VISUAL are set, the default is vi(1).

PAGER
    Specifies the pagination program to use.

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

FILES
${TMPDIR}/sysmerge.XXXXXXXXXX
    Default work directory. The temproot and backup directories are created relative to this.
/etc/sysmerge.ignore
    Files and directories to ignore from comparison.
/usr/share/sysmerge/etc.tgz
    Base system set containing the reference files corresponding to the currently installed release.
/usr/share/sysmerge/xetc.tgz
    X(7) set containing the reference files corresponding to the currently installed release.

SEE ALSO
more(1), sdiff(1)

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
-nosplit sysmerge was written by Antoine Jacoutot <ajacoutot@openbsd.org>. It was originally started as a friendly fork from mergemaster by Douglas Barton <DougB@FreeBSD.org>.