xref: /minix3/usr.sbin/postinstall/postinstall.8 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1.\"	$NetBSD: postinstall.8,v 1.18 2014/12/21 21:10:13 wiz Exp $
2.\"
3.\" Copyright (c) 2005-2008 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Thomas Klausner.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd December 21, 2014
31.Dt POSTINSTALL 8
32.Os
33.Sh NAME
34.Nm postinstall
35.Nd check and fix installation after system upgrades
36.Sh SYNOPSIS
37.Nm postinstall
38.Op Fl a Ar arch
39.Op Fl d Ar destdir
40.Op Fl m Ar machine
41.Op Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
42.Op Fl x Ar xsrcdir
43.Ar operation
44.Op Ar item Op ...
45.Sh DESCRIPTION
46The
47.Nm
48utility performs post-installation checks and/or fixes on a system's
49configuration files.
50It is especially useful after system upgrades, e.g. after updating
51from
52.Nx 1.6.2
53to
54.Nx 2.0 .
55The items to check or fix are divided in two groups: enabled by
56default and disabled by default.
57The latter are items that are dangerous for some reason, for example
58because they remove files which may be still in use.
59If no
60.Ar items
61are provided, the default checks or fixes are applied.
62Those which are disabled by default must be provided explicitly.
63.Pp
64Supported options:
65.Bl -tag -width XsXsrcdirXXX -offset indent
66.It Fl a Ar arch
67MACHINE_ARCH.
68Defaults to machine of the host operating system.
69.It Fl d Ar destdir
70Destination directory to check.
71Defaults to
72.Pa / .
73.It Fl m Ar machine
74MACHINE.
75Defaults to machine of the host operating system.
76.It Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
77The location of the reference files, or the
78.Nx
79source files used to create the reference files.
80This may be specified in one of three ways:
81.Bl -tag -width XXsXtgzfileXX
82.It Fl s Ar srcdir
83The top level directory of the
84.Nx
85source tree.
86By default this is
87.Pa /usr/src .
88.It Fl s Ar tgzdir
89A directory in which reference files have been
90extracted from a binary distribution of
91.Nx .
92The files that are distributed in the
93.Dq Pa etc.tgz
94set file must be present.
95The files that are distributed in the
96.Dq Pa xetc.tgz
97set file are optional.
98.It Fl s Ar tgzfile
99The location of a set file
100(or
101.Dq "tgz file" )
102such as
103.Dq Pa etc.tgz
104or
105.Dq Pa xetc.tgz
106from a binary distribution of
107.Nx .
108Each set file is a compressed archive containing reference files,
109which will be extracted to the
110.Pa temproot
111directory.
112Multiple
113.Fl s
114options may be used to specify multiple set files.
115The
116.Dq Pa etc.tgz
117set file must be specified.
118The
119.Dq Pa xetc.tgz
120set file is optional.
121.El
122.It Fl x Ar xsrcdir
123Location of the X11 source files.
124This must be a directory that contains a
125.Nx
126xsrc tree.
127.El
128.Pp
129The
130.Ar operation
131argument may be one of:
132.Bl -tag -width usageXX -offset indent
133.It Cm check
134Perform post-installation checks on items.
135.It Cm diff Op Xr diff 1 Li options
136Similar to
137.Cm check ,
138but also show the differences between the files.
139.It Cm fix
140Apply fixes that
141.Cm check
142determines need to be applied.
143Not all items can be automatically fixed by
144.Nm ,
145and in some cases an error will be reported,
146after which manual intervention will be required.
147.Pp
148Conflicts between existing files in the target file system
149and new files from the
150.Nx
151distribution are resolved by replacing the existing file
152with the new file; there is no attempt to merge the files.
153See
154.Xr etcupdate 8
155for an alternative update method that is able to merge files.
156.It Cm help
157Display a short help.
158.It Cm list
159List available
160.Ar items ,
161showing if they are enabled or disabled by default.
162.It Cm usage
163Same as
164.Cm help .
165.El
166.Sh EXIT STATUS
167The
168.Nm
169utility exits 0 on success, and \*[Gt]0 if an error occurs
170or a problem was found.
171.Sh SEE ALSO
172.Xr etcupdate 8
173.Sh HISTORY
174The
175.Nm
176utility first appeared in
177.Nx 1.6 .
178.Pp
179In
180.Nx 4.0 ,
181the
182.Fl s Ar tgzfile
183option was added.
184.Pp
185In
186.Nx 5.0 ,
187the ability to specify multiple colon-separated files with a single
188.Fl s
189option was deprecated.
190.Pp
191In
192.Nx 7.0 ,
193the ability to specify multiple colon-separated files with a single
194.Fl s
195option was removed.
196Multiple
197.Fl s
198options must be used instead.
199