xref: /minix/usr.sbin/postinstall/postinstall.8 (revision ebfedea0)
1.\"	$NetBSD: postinstall.8,v 1.16 2012/08/15 16:21:41 apb 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 August 15, 2012
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.Ar operation
43.Op Ar item Op ...
44.Sh DESCRIPTION
45The
46.Nm
47utility performs post-installation checks and/or fixes on a system's
48configuration files.
49It is especially useful after system upgrades, e.g. after updating
50from
51.Nx 1.6.2
52to
53.Nx 2.0 .
54The items to check or fix are divided in two groups: enabled by
55default and disabled by default.
56The latter are items that are dangerous for some reason, for example
57because they remove files which may be still in use.
58If no
59.Ar items
60are provided, the default checks or fixes are applied.
61Those which are disabled by default must be provided explicitly.
62.Pp
63Supported options:
64.Bl -tag -width XsXsrcdirXXX -offset indent
65.It Fl a Ar arch
66MACHINE_ARCH.
67Defaults to machine of the host operating system.
68.It Fl d Ar destdir
69Destination directory to check.
70Defaults to
71.Pa / .
72.It Fl m Ar machine
73MACHINE.
74Defaults to machine of the host operating system.
75.It Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
76The location of the reference files, or the
77.Nx
78source files used to create the reference files.
79This may be specified in one of three ways:
80.Bl -tag -width XXsXtgzfileXX
81.It Fl s Ar srcdir
82The top level directory of the
83.Nx
84source tree.
85By default this is
86.Pa /usr/src .
87.It Fl s Ar tgzdir
88A directory in which reference files have been
89extracted from a binary distribution of
90.Nx .
91The files that are distributed in the
92.Dq Pa etc.tgz
93set file must be present.
94The files that are distributed in the
95.Dq Pa xetc.tgz
96set file are optional.
97.It Fl s Ar tgzfile
98The location of a set file
99(or
100.Dq "tgz file" )
101such as
102.Dq Pa etc.tgz
103or
104.Dq Pa xetc.tgz
105from a binary distribution of
106.Nx .
107Each set file is a compressed archive containing reference files,
108which will be extracted to the
109.Pa temproot
110directory.
111Multiple
112.Fl s
113options may be used to specify multiple set files.
114The
115.Dq Pa etc.tgz
116set file must be specified.
117The
118.Dq Pa xetc.tgz
119set file is optional.
120.El
121.El
122.Pp
123The
124.Ar operation
125argument may be one of:
126.Bl -tag -width usageXX -offset indent
127.It Cm check
128Perform post-installation checks on items.
129.It Cm diff Op Xr diff 1 Li options
130Similar to
131.Cm check ,
132but also show the differences between the files.
133.It Cm fix
134Apply fixes that
135.Cm check
136determines need to be applied.
137Not all items can be automatically fixed by
138.Nm ,
139and in some cases an error will be reported,
140after which manual intervention will be required.
141.Pp
142Conflicts between existing files in the target file system
143and new files from the
144.Nx
145distribution are resolved by replacing the existing file
146with the new file; there is no attempt to merge the files.
147See
148.Xr etcupdate 8
149for an alternative update method that is able to merge files.
150.It Cm help
151Display a short help.
152.It Cm list
153List available
154.Ar items ,
155showing if they are enabled or disabled by default.
156.It Cm usage
157Same as
158.Cm help .
159.El
160.Sh EXIT STATUS
161The
162.Nm
163utility exits 0 on success, and \*[Gt]0 if an error occurs
164or a problem was found.
165.Sh SEE ALSO
166.Xr etcupdate 8
167.Sh HISTORY
168The
169.Nm
170utility first appeared in
171.Nx 1.6 .
172.Pp
173In
174.Nx 4.0 ,
175the
176.Fl s Ar tgzfile
177option was added.
178.Pp
179In
180.Nx 5.0 ,
181the ability to specify multiple colon-separated files with a single
182.Fl s
183option was deprecated.
184.Pp
185In
186.Nx 7.0 ,
187the ability to specify multiple colon-separated files with a single
188.Fl s
189option was removed.
190Multiple
191.Fl s
192options must be used instead.
193