Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-2.0)
Apropos / Subsearch:
optional field

ETCUPDATE(8)              BSD System Manager's Manual             ETCUPDATE(8)

     etcupdate -- update the configuration and startup files in /etc

     etcupdate [-ahlv] [-b srcdir] [-p pager] [-s srcdir] [-t temproot]
               [-w width]

     etcupdate is a tool that lets the administrator update the configuration
     and startup files in /etc (and some other directories like /dev, /root
     and /var) without having to manually check and modify every file.  The
     administrator should run this script after performing an operating system
     update (e.g. after running make build in /usr/src or after extracting new
     binary distribution files) to update to the latest configuration and
     startup files.

     etcupdate compares the new configuration files against the currently
     installed files.  The user is given the option of installing, merging or
     deleting each modified or missing file.  etcupdate also detects if the
     user installs certain special files and performs corresponding tasks like
     remaking device nodes or rebuilding a database from the aliases(5) file.

     etcupdate needs a clean set of new configuration files to compare the
     existing files against.  These files, called the ``reference files'' in
     this manual, may be derived from either a source or binary distribution
     of NetBSD.

     If the user is updating from sources (which is the default mode),
     etcupdate will first create a copy of the reference files by running make
     distribution in /usr/src/etc, installing the files to a so-called
     temproot.  (See usage of the -s srcdir and -t temproot options later in
     this manual page.)

     Instead of using sources, the user can also extract one or more binary
     distribution sets in a special location and use those as the reference
     files (see usage of the -b srcdir option later in this manual page).

     The following options are available:

     -a             etcupdate can automatically update files which have not
                    been modified locally.  The -a flag instructs etcupdate to
                    store MD5 checksums in /var/etcupdate and use these check-
                    sums to determine if there have been any local modifica-

     -b srcdir      Location of reference files extracted from a binary dis-
                    tribution of NetBSD.  Note that reference files in srcdir
                    will be altered and removed by etcupdate when using the -b
                    srcdir option (as the srcdir directory is treated like

     -h             Prints a help text.

     -l             Automatically skip files with unchanged RCS IDs.  This has
                    the effect of leaving alone files that have been altered
                    locally but which have not been changed in the reference
                    files.  Since this works using RCS IDs, files without RCS
                    IDs will not be skipped even if only modified locally.
                    This flag may be used together with the -a flag described

     -p pager       The pager to use when displaying files.  By default this
                    is more(1) but it can be changed either with this option
                    or by defining the PAGER variable.

     -s srcdir      The location of the NetBSD sources files used to create
                    the reference files.  By default this is /usr/src/etc but
                    it can be changed either with this option or the SRCDIR

     -t temproot    Specifies the location of the temproot directory.  The
                    temporary reference files created from /usr/src/etc will
                    be stored there.  By default this is /tmp/temproot but can
                    be changed either with this option or the TEMPROOT envi-
                    ronment variable.

     -v             Makes etcupdate verbose about its actions.

     -w width       Sets screen width used during interactive merge.  By
                    default this is the number of columns stty(1) reports but
                    it can be changed either with this option or by defining
                    the WIDTH variable.  This is useful for xterm(1) users
                    with wider shell windows.

     TEMPROOT       Sets a default value for temproot.  See -t above.

     SRCDIR         The location of the NetBSD sources files.  See -s above.

     PAGER          The pager to use when displaying files.  See -p above.

     WIDTH          The screen width used during interactive merge.  See -w

     IGNOREFILES    A list of files that etcupdate should ignore.  Files
                    listed in this variable will never be considered for
                    updating by etcupdate.

     The environment variables can also be defined in the following configura-
     tion files.  The user's personal configuration file settings override the
     global settings.



     You have just upgraded your NetBSD host from 1.6 to 1.6.1 and now it's
     time to update the configuration files as well.  To update the configura-
     tion files from the sources (if you have the /usr/src/etc directory):


     The default location of the source files is /usr/src/etc but this may be
     overridden with the -s srcdir command line argument:

           etcupdate -s /some/where/src/etc

     To update the configuration files from binary distribution sets do some-
     thing like this:

           mkdir /tmp/temproot
           cd /tmp/temproot
           tar xpzf /some/where/etc.tgz
           etcupdate -b /tmp/temproot

     You have modified only few files in the /etc directory so you would like
     install most of the updates without being asked.  To automatically update
     the unmodified configuration files:

           etcupdate -a

     To get a better idea what's going on, use the -v flag:

           etcupdate -v

     cmp(1), more(1), rcs(1), sdiff(1), stty(1), aliases(5)

     The etcupdate command appeared in NetBSD 1.6.

     The script was written by Martti Kuparinen <marttiATNetBSD.org> and
     improved by several other NetBSD users.

     The idea for this script (including code fragments, variable names etc.)
     came from the FreeBSD mergemaster (by Douglas Barton).  Unlike the
     FreeBSD mergemaster, this does not use CVS version tags by default to
     compare if the files need to be updated.  Files are compared with cmp(1)
     as this is more reliable and the only way if the version numbers are the
     same even though the files are different.

BSD                              April 2, 2003                             BSD