- NetBSD Manual Pages
POSTINSTALL(8) NetBSD System Manager's Manual POSTINSTALL(8)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
postinstall -- check and fix installation after system upgrades
postinstall [-a arch] [-d destdir] [-m machine]
[-s (srcdir | tgzdir | tgzfile)] [-x xsrcdir] operation ...
The postinstall utility performs post-installation checks and/or fixes on
a system's configuration files. It is especially useful after system
upgrades, e.g. after updating from NetBSD 1.6.2 to NetBSD 2.0. The items
to check or fix are divided in two groups: enabled by default and dis-
abled by default. The latter are items that are dangerous for some rea-
son, for example because they remove files which may be still in use. If
no items are provided, the default checks or fixes are applied. Those
which are disabled by default must be provided explicitly.
-a arch MACHINE_ARCH. Defaults to machine of the host oper-
-d destdir Destination directory to check. Defaults to /.
-m machine MACHINE. Defaults to machine of the host operating
-s (srcdir | tgzdir | tgzfile)
The location of the reference files, or the NetBSD
source files used to create the reference files.
This may be specified in one of three ways:
-s srcdir The top level directory of the NetBSD
source tree. By default this is
-s tgzdir A directory in which reference files
have been extracted from a binary dis-
tribution of NetBSD. The files that
are distributed in the ``etc.tgz'' or
``etc.tar.xz'' set file must be
present. The files that are distrib-
uted in the ``xetc.tgz'' or
``xetc.tar.xz'' set file are optional.
-s tgzfile The location of a set file (or ``tgz
file'' or ``tar.xz file'') such as
``etc.tgz'' or ``xetc.tgz'' from a
binary distribution of NetBSD. Each
set file is a compressed archive con-
taining reference files, which will be
extracted to the temproot directory.
Multiple -s options may be used to
specify multiple set files. The
``etc.tgz'' set file must be speci-
fied. The ``xetc.tgz'' set file is
-x xsrcdir Location of the X11 source files. This must be a
directory that contains a NetBSD xsrc tree.
-? Display help to stdout, and exit.
The operation argument may be one of:
check item ...
Perform post-installation checks on items.
diff [-bcenpuw] item ...
Similar to check, but also show the differences between
fix item ...
Apply fixes that check determines need to be applied. Not
all items can be automatically fixed by postinstall, and
in some cases an error will be reported, after which man-
ual intervention will be required.
Conflicts between existing files in the target file system
and new files from the NetBSD distribution are resolved by
replacing the existing file with the new file; there is no
attempt to merge the files. See etcupdate(8) for an
alternative update method that is able to merge files.
help Display help to stdout, and exit.
list List available items, showing if they are enabled or dis-
abled by default.
usage Display help to stdout, and exit.
The postinstall utility exits 0 on success, and >0 if an error occurs or
a problem was found.
The postinstall utility first appeared in NetBSD 1.6.
In NetBSD 4.0, the -s tgzfile option was added.
In NetBSD 5.0, the ability to specify multiple colon-separated files with
a single -s option was deprecated.
In NetBSD 7.0, the ability to specify multiple colon-separated files with
a single -s option was removed. Multiple -s options must be used
NetBSD 10.99 January 9, 2022 NetBSD 10.99