1 .\" $NetBSD: etcupdate.8,v 1.18 2008/10/04 08:07:38 apb Exp $
3 .\" Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Martti Kuparinen.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
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.
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.
35 .Nd update the configuration and startup files in
41 .Op Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
46 is a tool that lets the administrator update the configuration and
49 (and some other directories like
54 without having to manually check and modify every file.
55 The administrator should run this script after performing an operating
56 system update (e.g. after running
60 or after extracting new binary distribution files)
61 to update to the latest configuration and startup files.
64 compares the new configuration files against the currently installed files.
65 The user is given the option of installing, merging or deleting each
66 modified or missing file.
67 The user can also view the differences between the files.
68 By default, it shows the differences in the unified diff format.
69 The default format can be toggled to show the differences
70 in unified, context, or side by side formats or an user-defined
71 command may be used to view differences.
74 is installed, it can also show differences on a word by word basis.)
77 also detects if the user installs certain special files and performs
78 corresponding tasks like remaking device nodes or rebuilding a database
89 needs a clean set of new configuration files to compare the
90 existing files against.
91 These files, called the
93 in this manual, may be derived from either a source or binary
97 If the user is updating from sources (which is the default mode),
99 will first create a copy of the reference files
101 .Pa make distribution
104 installing the files to a so-called
110 options later in this manual page.)
111 Although this is the default mode, it is not recommended
116 Instead of using sources, it is recommended that the user should extract
117 one or more binary distribution sets in a special location and use those
118 as the reference files (see usage of the
120 option later in this manual page),
121 or specify one or more binary distribution sets directly
124 option later in this manual page).
126 The following options are available:
127 .Bl -tag -width XXtXtemprootX
130 can automatically update files which have not been modified locally.
135 to store MD5 checksums in
137 and use these checksums to determine if there have been any
142 Automatically skip files with unchanged RCS IDs.
143 This has the effect of leaving alone files that have been altered
144 locally but which have not been changed in the
146 Since this works using RCS IDs, files without RCS IDs will not be
147 skipped even if only modified locally.
148 This flag may be used together with the
150 flag described above.
152 The pager to use when displaying files.
155 but it can be changed either with this option
159 .It Fl s Brq Ar srcdir | Ar tgzdir | Ar tgzfile
160 The location of the reference files, or the
162 source files used to create the reference files.
163 This may be specified in one of three ways:
164 .Bl -tag -width XXsXtgzfileXX
166 The top level directory of the
171 but it can be changed either with this option
175 The reference files will be created by running
176 .Dq "make distribution"
178 .Ar srcdir Ns Pa /etc
182 should refer to the top of the source directory tree;
189 subdirectory within the source tree.
191 A directory in which reference files have been
192 extracted from a binary distribution of
194 The files that are distributed in the
196 set file must be present.
197 The files that are distributed in the
199 set file are optional.
200 The reference files from the specified directory will be copied to the
204 The location of a set file
211 from a binary distribution of
213 Each set file is a compressed archive containing reference files,
214 which will be extracted to the
219 options may be used to specify multiple set files.
222 set file must be specified.
225 set file is optional.
228 Specifies the location of the
231 This directory will be used for a temporary copy of
232 the reference files created by running
233 .Dq "make distribution"
234 in the source directory specified by
236 or a temporary copy of the reference files extracted from
237 the binary sets specified by
239 or a temporary copy of the reference files from the directory specified by
243 but can be changed either with this option or the
245 environment variable.
249 verbose about its actions.
251 Sets screen width used during interactive merge.
252 By default this is the number of columns
254 reports but it can be changed either with this
255 option or by defining the
260 users with wider shell windows.
263 .Bl -tag -width IGNOREFILESXX
265 Sets a default value for
278 The pager to use when displaying files.
283 The screen width used during interactive merge.
292 variable will never be considered for updating by
296 The environment variables can also be defined in the following configuration
298 The user's personal configuration file settings override the global
305 You have just upgraded your
307 host from 3.0 to 4.0 and now it's time
308 to update the configuration files as well.
309 To update the configuration files from the sources (if you have the
315 The default location of the source files is
317 but this may be overridden with the
319 command line argument:
321 .Dl etcupdate -s /some/where/src
323 To update the configuration files from binary distribution sets
324 do something like this:
326 .Dl etcupdate -s /some/where/etc.tgz -s /some/where/xetc.tgz
330 .Dl mkdir /tmp/temproot
332 .Dl tar -xpzf /some/where/etc.tgz
333 .Dl tar -xpzf /some/where/xetc.tgz
334 .Dl etcupdate -s /tmp/temproot
336 You have modified only few files in the
338 directory so you would like install most of the updates without being asked.
339 To automatically update the unmodified configuration files:
343 To get a better idea what's going on, use the
366 option was added, the
368 option was converted to
372 option was changed to refer to the top of the
373 source directory tree rather than to the
379 the ability to specify multiple colon-separated files with a single
381 option was deprecated,
382 and options deprecated in
386 The script was written by
388 .Aq martti@NetBSD.org
389 and improved by several other
393 The idea for this script (including code fragments, variable names etc.)
396 mergemaster (by Douglas Barton).
399 mergemaster, this does not use CVS version tags by default to compare if
400 the files need to be updated.
401 Files are compared with
403 as this is more reliable and the only way if the version numbers are the
404 same even though the files are different.
405 .\" when exactly are the version the same even though the file changes?
408 If a source directory is specified via the
412 directory is used by default), then
415 .Dq "make distribution"
418 subdirectory of the source directory, but it will not use the same
419 options or environment variables that would be used during a full build
420 of the operating system.
421 For this reason, use of the
423 option is not recommended, and use of the
427 options is recommended.
429 .\" Because of the use of
431 .\" to compare files, rather than CVS versions, files that are locally changed
432 .\" from the distribution are always considered needing to be updated.