summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authormartti <martti@pkgsrc.org>2005-09-16 07:40:22 +0000
committermartti <martti@pkgsrc.org>2005-09-16 07:40:22 +0000
commitb5c6a9cbbb21ea366e1e83f0427b0081fd54d971 (patch)
tree5f632a397dfaab156f8813d895599875288176b8 /sysutils
parent1dce0d192316183ddae21de2654be68b5e9a5cc9 (diff)
downloadpkgsrc-b5c6a9cbbb21ea366e1e83f0427b0081fd54d971.tar.gz
Removed etcupdate from pkgsrc as it is included in NetBSD 1.6 and later.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile3
-rw-r--r--sysutils/etcupdate/DESCR9
-rw-r--r--sysutils/etcupdate/Makefile28
-rw-r--r--sysutils/etcupdate/PLIST3
-rwxr-xr-xsysutils/etcupdate/files/etcupdate539
-rw-r--r--sysutils/etcupdate/files/etcupdate.8315
6 files changed, 1 insertions, 896 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 08e47b80889..7d8e6eb99d1 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.305 2005/08/10 21:04:26 jlam Exp $
+# $NetBSD: Makefile,v 1.306 2005/09/16 07:40:22 martti Exp $
#
COMMENT= System utilities
@@ -55,7 +55,6 @@ SUBDIR+= dvdrecord
SUBDIR+= e2fsprogs
SUBDIR+= easydiskpasswd
SUBDIR+= estd
-SUBDIR+= etcupdate
SUBDIR+= extipl
SUBDIR+= fakeroot
SUBDIR+= fam
diff --git a/sysutils/etcupdate/DESCR b/sysutils/etcupdate/DESCR
deleted file mode 100644
index 8f2a7473cbd..00000000000
--- a/sysutils/etcupdate/DESCR
+++ /dev/null
@@ -1,9 +0,0 @@
-etcupdate helps you to update the configuration files in /etc after
-performing an operating system upgrade.
-
-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 to compare if the files
-need to be updated. Files are compared with /usr/bin/cmp as this is more
-reliable and the only way if the version numbers are same even though the
-files are different.
diff --git a/sysutils/etcupdate/Makefile b/sysutils/etcupdate/Makefile
deleted file mode 100644
index bdb7f6bf594..00000000000
--- a/sysutils/etcupdate/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# $NetBSD: Makefile,v 1.30 2005/04/11 21:47:23 tv Exp $
-
-DISTNAME= etcupdate-20031112
-CATEGORIES= sysutils
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= martti@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/Documentation/current/
-COMMENT= Script to update the configuration and startup files in /etc
-
-ONLY_FOR_PLATFORM= NetBSD-*-*
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # defined
-NO_CHECKSUM= # defined
-NO_CONFIGURE= # defined
-NO_BUILD= # defined
-
-INSTALLATION_DIRS= bin man/man8
-
-do-install:
- ${INSTALL_SCRIPT} ${FILESDIR}/etcupdate ${PREFIX}/bin/etcupdate
- ${INSTALL_MAN} ${FILESDIR}/etcupdate.8 ${PREFIX}/man/man8
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/etcupdate/PLIST b/sysutils/etcupdate/PLIST
deleted file mode 100644
index b2cbb95e97f..00000000000
--- a/sysutils/etcupdate/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2001/11/20 09:53:54 martti Exp $
-bin/etcupdate
-man/man8/etcupdate.8
diff --git a/sysutils/etcupdate/files/etcupdate b/sysutils/etcupdate/files/etcupdate
deleted file mode 100755
index 032c339ce12..00000000000
--- a/sysutils/etcupdate/files/etcupdate
+++ /dev/null
@@ -1,539 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: etcupdate,v 1.23 2003/12/03 04:51:43 martti Exp $
-#
-# Copyright (c) 2001 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Martti Kuparinen.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-#
-# This script helps you to update the configuration files in /etc
-# after an operating system upgrade. Instead of running "make distribution"
-# in /usr/src/etc (and losing your current configuration) you can easily
-# see the modifications and either install the new version or merge the
-# changes in to your current configuration files.
-#
-# This script was written by Martti Kuparinen <martti@NetBSD.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).
-#
-PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
-
-# Default settings
-TEMPROOT="${TEMPROOT:=/tmp/temproot}"
-SRCDIR="${SRCDIR:=/usr/src/etc}"
-PAGER="${PAGER:=/usr/bin/more}"
-SWIDTH=`stty -a | awk '/columns/{w=$6}END{if(w==0){w=80}print w}'`
-WIDTH="${WIDTH:=${SWIDTH}}"
-VERBOSE=
-CONTINUE=
-BINARY=
-AUTOMATIC=
-LOCALSKIP=
-MACHINE="${MACHINE:=`uname -m`}"
-export MACHINE
-MACHINE_ARCH="${MACHINE_ARCH:=`uname -p`}"
-export MACHINE_ARCH
-
-# Settings for post-installation procedures
-NEED_MTREE=
-NEED_MAKEDEV=
-NEED_NEWALIASES=
-NEED_PWD_MKDB=
-
-usage() {
- cat << EOF
-
-Usage: `basename $0` [options]
-
-Options:
-
- -b srcdir Location of the extracted sets
- -p pager Which pager to use (default: /usr/bin/more)
- -s srcdir Location of the source files (default: /usr/src/etc)
- -t temproot Where to store temporary files (default: /tmp/temproot)
- -w width Screen width (default: 80)
-
- -a Automatically update unmodified files
- -l Automatically skip files with strictly local changes
- (this option has no effect on files lacking RCS Ids)
- -h This help text
- -v Be more verbose
-
-EOF
- exit 1
-}
-
-verbose() {
- # $* = message to display if in verbose mode
-
- [ ! -z "${VERBOSE}" ] && echo ${*}
-}
-
-yesno() {
- # $* = message to display
-
- echo -n "${*}? (y/[n]) "
- read ANSWER
- case "${ANSWER}" in
- y|Y)
- return 0
- ;;
- *)
- return 1
- ;;
- esac
-}
-
-install_dir() {
- # $1 = target directory
-
- if yesno "Create ${1}"; then
- verbose "Creating ${1}"
- mkdir -p "${1}" || exit 1
- NEED_MTREE=YES
- fi
-}
-
-install_file() {
- # $1 = target file
-
- # Install the new file
- verbose "Installing ${1}"
- cp -p "${TEMPROOT}${1}" "${1}" && rm -f "${TEMPROOT}${1}"
-
- # Check if this was a special file
- case "${1}" in
- /dev/MAKEDEV)
- NEED_MAKEDEV=YES
- ;;
- /dev/MAKEDEV.local)
- NEED_MAKEDEV=YES
- ;;
- /etc/mail/aliases)
- NEED_NEWALIASES=YES
- ;;
- /etc/master.passwd)
- NEED_PWD_MKDB=YES
- ;;
- esac
-}
-
-install_checksum() {
- # $1 = target file
-
- [ "${AUTOMATIC}" != "YES" ] && return
-
- D=`dirname "${1}"`
- mkdir -p "/var/etcupdate/${D}"
- md5 "${1}" > "/var/etcupdate/${1}"
-}
-
-diff_and_merge_file() {
- # $1 = target file
-
- if cmp -s "${TEMPROOT}${1}" "${1}"; then
- verbose "===> ${1} (ok)"
- rm -f "${TEMPROOT}${1}"
- install_checksum "${1}"
- return
- fi
-
- if [ "${AUTOMATIC}" = "YES" -a -f "/var/etcupdate/${1}" ] ; then
- SUM1=`md5 "${1}"`
- SUM2=`cat "/var/etcupdate/${1}"`
- if [ "${SUM1}" = "${SUM2}" ] ; then
- install_file "${1}"
- install_checksum "${1}"
- return
- fi
- fi
-
- if [ "${LOCALSKIP}" = "YES" ] ; then
- ID1=`ident -q "${TEMPROOT}${1}" | sed -n 2p`
- ID1="${ID1:-0}"
- ID2=`ident -q "${1}" | sed -n 2p`
- ID2="${ID2:-1}"
- if [ "${ID1}" = "${ID2}" ] ; then
- verbose "===> ${1} (ok:RCS)"
- rm -f "${TEMPROOT}${1}"
- return
- fi
- fi
-
- clear
- if [ ! -f "${1}" ]; then
- verbose "===> ${1} (missing)"
- DOES_EXIST=
- else
- verbose "===> ${1} (modified)"
- verbose ""
- DOES_EXIST=YES
- diff -u "${1}" "${TEMPROOT}${1}" | ${PAGER}
- fi
-
- STAY_HERE=YES
- ALREADY_MERGED=
-
- # Determine name for the backup file (/foo/._etcupdate.bar)
- D=`dirname "${TEMPROOT}${1}"`
- F=`basename "${TEMPROOT}${1}"`
- B="${D}/.etcupdate.${F}"
- F="${D}/${F}"
-
- while [ "x${STAY_HERE}" = "xYES" ]; do
-
- # Ask the user if (s)he wants to install the new
- # version or perform a more complicated manual work.
- echo ""
- echo -n "File: ${1}"
- if [ ! -f "${1}" ]; then
- echo -n " (missing)"
- else
- echo -n " (modified)"
- fi
- echo ""
- echo ""
- echo "Please select one of the following operations:"
- echo ""
- if [ -z "${DOES_EXIST}" ]; then
- cat << EOF
- d Don't install the missing file
- i Install the missing file
- v Show the missing file
-
-EOF
- elif [ -z "${ALREADY_MERGED}" ]; then
- cat << EOF
- d Don't install the new file
- i Install the new file (overwrites your modifications!)
- m Merge the currently installed and new files
- s Show the differences between the currently installed and new files
- v Show the new file
-
-EOF
- else
- cat << EOF
- d Don't install the new file
- i Install the new file (overwrites your modifications!)
- m Merge again the currently installed and new files
- s Show the differences between the currently installed and new files
- u Undo merge and restore the temporary file from backup
- v Show the merged file
-
-EOF
- fi
- echo -n "What do you want to do? [Leave it for later] "
- read ANSWER
- case "${ANSWER}" in
-
- [dD])
- verbose "Removing ${TEMPROOT}${1}"
- rm -f "${TEMPROOT}${1}"
- STAY_HERE=NO
- ;;
- [iI])
- install_file "${1}"
- if [ -z "${ALREADY_MERGED}" ]; then
- install_checksum "${1}"
- fi
- STAY_HERE=NO
- ;;
- [mM])
- [ -z "${DOES_EXIST}" ] && continue
- [ ! -f "${B}" ] && cp "${F}" "${B}"
- cp "${TEMPROOT}${1}" "${TEMPROOT}${1}.merged"
- sdiff -o "${TEMPROOT}${1}.merged" \
- --width=${WIDTH} \
- --suppress-common-lines --text \
- "${1}" "${TEMPROOT}${1}"
- mv -f "${TEMPROOT}${1}.merged" "${TEMPROOT}${1}"
- ALREADY_MERGED=YES
- ;;
- [sS])
- [ -z "${DOES_EXIST}" ] && continue
- diff -u "${1}" "${TEMPROOT}${1}" | ${PAGER}
- ;;
- [uU])
- if [ -f "${B}" ]; then
- echo "*** Restoring ${F}"
- mv -f "${B}" "${F}"
- fi
- ALREADY_MERGED=
- ;;
- [vV])
- ${PAGER} "${TEMPROOT}${1}"
- ;;
- "")
- STAY_HERE=NO
- ;;
- *)
- echo "*** Invalid selection!"
- ;;
- esac
- done
- rm -f "._etcupdate_${TEMPROOT}${1}"
-}
-
-#
-# main()
-#
-
-# Read global configuration
-GLOBALRC="/etc/`basename $0`.conf"
-[ -r ${GLOBALRC} ] && . ${GLOBALRC}
-
-# Read user configuration
-USERRC="${HOME}/.`basename $0`rc"
-[ -r ${USERRC} ] && . ${USERRC}
-
-# Read command line arguments
-ARGV=`getopt ab:hlp:s:t:vw: $*`
-[ $? != 0 ] && usage
-set -- ${ARGV}
-for i; do
- case "${i}" in
- -a)
- AUTOMATIC=YES
- shift
- ;;
- -b)
- BINARY=YES
- SRCDIR="${2}"
- shift 2
- ;;
- -h)
- usage
- ;;
- -l)
- LOCALSKIP=YES
- shift
- ;;
- -p)
- PAGER="${2}"
- shift 2
- ;;
- -s)
- SRCDIR="${2}"
- shift 2
- ;;
- -t)
- TEMPROOT="${2}"
- shift 2
- ;;
- -v)
- VERBOSE=YES
- shift
- ;;
- -w)
- WIDTH="${2}"
- shift 2
- ;;
- --)
- shift
- break
- ;;
- esac
-done
-
-# Last minute sanity checks
-if [ `id -u` -ne 0 ]; then
- echo "*** ERROR: You MUST be root"
- exit 1
-fi
-if [ ! -z "${BINARY}" ]; then
- TEMPROOT="${SRCDIR}"
-fi
-if [ -z "${SRCDIR}" -o -z "${TEMPROOT}" ]; then
- echo "*** ERROR: One of the following variables is undefined"
- echo ""
- echo "SRCDIR=\"${SRCDIR}\""
- echo "TEMPROOT=\"${TEMPROOT}\""
- echo ""
- exit 1
-fi
-if [ -z "${BINARY}" -a -r "${TEMPROOT}" ]; then
- echo ""
- echo "*** WARNING: ${TEMPROOT} already exists"
- echo ""
- if yesno "Continue previously aborted update"; then
- CONTINUE=YES
- elif yesno "Remove the old ${TEMPROOT}"; then
- echo "*** Removing ${TEMPROOT}"
- rm -rf "${TEMPROOT}"
- fi
-fi
-
-if [ -z "${CONTINUE}" ]; then
- # Are we using the sources or binaries?
- if [ -z "${BINARY}" ]; then
- # Create the temporary root directory
- echo "*** Creating ${TEMPROOT}"
- mkdir -p "${TEMPROOT}"
- if [ ! -d "${TEMPROOT}" ]; then
- echo "*** ERROR: Unable to create ${TEMPROOT}"
- exit 1
- fi
-
- # Populate ${TEMPROOT} from ${SRCDIR}
- if [ ! -f "${SRCDIR}/Makefile" ]; then
- echo "*** ERROR: Unable to find ${SRCDIR}/Makefile"
- exit 1
- fi
- # Set the environment for make
- MAKE_ENV=" \
- DESTDIR=${TEMPROOT} \
- MAKE=make \
- MTREE=mtree \
- TOOL_MTREE=mtree \
- INSTALL_DONE=1 \
- USETOOLS=never"
- echo "*** Populating ${TEMPROOT} from ${SRCDIR}"
- cd ${SRCDIR}
- if [ -z "${VERBOSE}" ]; then
- eval ${MAKE_ENV} make distribution > /dev/null
- else
- eval ${MAKE_ENV} make distribution
- fi
- [ $? -ne 0 ] && exit 1
- elif [ ! -f "${TEMPROOT}/dev/MAKEDEV" ]; then
- echo ""
- echo "*** WARNING: ${TEMPROOT}/dev/MAKEDEV not found"
- echo "Make sure you update /dev/MAKEDEV later and run"
- echo "(cd /dev && ./MAKEDEV all) to rebuild the device nodes"
- echo ""
- fi
-
- # Ignore the following files during comparision
- rm -f "${TEMPROOT}"/etc/passwd
- rm -f "${TEMPROOT}"/etc/pwd.db
- rm -f "${TEMPROOT}"/etc/spwd.db
- find "${TEMPROOT}" -type f -size 0 -exec rm {} \;
-
- # Ignore files we're told to ignore
- if [ ! -z "${IGNOREFILES}" ]; then
- echo "*** Ignoring files: ${IGNOREFILES}"
- for file in ${IGNOREFILES}; do
- rm -f "${TEMPROOT}"${file}
- done
- fi
-
- # Are there any new directories?
- echo "*** Checking for new directories"
- for i in `find ${TEMPROOT} -type d`; do
- D=`echo ${i} | sed "s#${TEMPROOT}##"`
- [ "x${i}" = "x${TEMPROOT}" ] && continue
- [ ! -d "${D}" ] && install_dir "${D}"
- done
-fi
-
-# Start the comparision
-echo "*** Checking for added/modified files"
-for i in `find ${TEMPROOT} -type f -a ! -name \*.etcupdate.\*`; do
- D=`echo ${i} | sed "s#${TEMPROOT}##"`
- diff_and_merge_file "${D}"
-done
-
-# Do we have files which were not processed?
-REMAINING=`find "${TEMPROOT}" -type f -a ! -name \*.etcupdate.\*`
-if [ ! -z "${REMAINING}" ]; then
- echo ""
- echo "*** The following files need your attention:"
- echo ""
- for i in ${REMAINING}; do
- echo " ${i}"
- done
- echo ""
-fi
-if yesno "Remove ${TEMPROOT}"; then
- echo "*** Removing ${TEMPROOT}"
- rm -rf "${TEMPROOT}"
-else
- echo "*** Keeping ${TEMPROOT}"
-fi
-
-# Do some post-installation tasks
-if [ ! -z "${NEED_MTREE}" ]; then
- if yesno "You have created new directories. Run mtree to set" \
- "permissions"
- then
- (cd / && mtree -Udef /etc/mtree/NetBSD.dist)
- fi
-fi
-if [ ! -z "${NEED_MAKEDEV}" ]; then
- if yesno "Do you want to rebuild the device nodes in /dev"; then
- verbose "Running MAKEDEV in /dev"
- (cd "/dev" && ./MAKEDEV all)
- else
- echo ""
- echo "*** You SHOULD rebuild the device nodes in /dev"
- echo "*** This is done by running \"(cd /dev &&" \
- "./MAKEDEV all)\" as root".
- echo ""
- fi
-fi
-if [ ! -z "${NEED_NEWALIASES}" ]; then
- if yesno "Do you want to rebuild the mail alias database"; then
- verbose "Running newaliases"
- newaliases
- else
- echo ""
- echo "*** You MUST rebuild the mail alias database to make" \
- "the changes visible"
- echo "*** This is done by running \"newaliases\" as root"
- echo ""
- fi
-fi
-if [ ! -z "${NEED_PWD_MKDB}" ]; then
- if yesno "Do you want to rebuild the password databases from the" \
- "new master.passwd"
- then
- verbose "Running pwd_mkdb"
- pwd_mkdb -p "/etc/master.passwd"
- else
- echo ""
- echo "*** You MUST rebuild the password databases to make" \
- "the changes visible"
- echo "*** This is done by running \"pwd_mkdb -p" \
- "/etc/master.passwd\" as root"
- echo ""
- fi
-fi
-if [ -x /etc/postinstall -a -z "${BINARY}" ]; then
- S=`echo ${SRCDIR} | sed 's+/etc++'`
- echo "*** Running /etc/postinstall"
- /etc/postinstall -s "${S}" check
-fi
-echo "*** All done"
diff --git a/sysutils/etcupdate/files/etcupdate.8 b/sysutils/etcupdate/files/etcupdate.8
deleted file mode 100644
index a7d94bc9480..00000000000
--- a/sysutils/etcupdate/files/etcupdate.8
+++ /dev/null
@@ -1,315 +0,0 @@
-.\" $NetBSD: etcupdate.8,v 1.10 2003/12/03 04:51:43 martti Exp $
-.\"
-.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Martti Kuparinen.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd April 2, 2003
-.Dt ETCUPDATE 8
-.Os
-.Sh NAME
-.Nm etcupdate
-.Nd update the configuration and startup files in
-.Pa /etc
-.Sh SYNOPSIS
-.Nm
-.Op Fl ahlv
-.Op Fl b Ar srcdir
-.Op Fl p Ar pager
-.Op Fl s Ar srcdir
-.Op Fl t Ar temproot
-.Op Fl w Ar width
-.Sh DESCRIPTION
-.Nm
-is a tool that lets the administrator update the configuration and
-startup files in
-.Pa /etc
-(and some other directories like
-.Pa /dev ,
-.Pa /root
-and
-.Pa /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
-.Pa make build
-in
-.Pa /usr/src
-or after extracting new binary distribution files)
-to update to the latest configuration and startup files.
-.Pp
-.Nm
-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.
-.Nm
-also detects if the user installs certain special files and performs
-corresponding tasks like remaking device nodes or rebuilding a database
-from the
-.Xr aliases 5
-file.
-.Pp
-.Nm
-needs a clean set of new configuration files to compare the
-existing files against.
-These files, called the
-.Dq reference files
-in this manual, may be derived from either a source or binary
-distribution of
-.Nx .
-.Pp
-If the user is updating from sources (which is the default mode),
-.Nm
-will first create a copy of the reference files
-by running
-.Pa make distribution
-in
-.Pa /usr/src/etc ,
-installing the files to a so-called
-.Pa temproot .
-(See usage of the
-.Fl s Ar srcdir
-and
-.Fl t Ar temproot
-options later in this manual page.)
-.Pp
-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
-.Fl b Ar srcdir
-option later in this manual page).
-.Pp
-The following options are available:
-.Bl -tag -width XXtXtemprootX
-.It Fl a
-.Nm
-can automatically update files which have not been modified locally.
-The
-.Fl a
-flag instructs
-.Nm
-to store MD5 checksums in
-.Pa /var/etcupdate
-and use these checksums to determine if there have been any
-local modifications.
-.It Fl b Ar srcdir
-Location of reference files extracted from a binary distribution of
-.Nx .
-Note that reference files in
-.Pa srcdir
-will be altered and removed by
-.Nm
-when using the
-.Fl b Ar srcdir
-option (as the
-.Pa srcdir
-directory is treated like
-.Pa temproot ) .
-.It Fl h
-Prints a help text.
-.It Fl 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
-.Fl a
-flag described above.
-.It Fl p Ar pager
-The pager to use when displaying files.
-By default this is
-.Xr more 1
-but it can be changed either with this option
-or by defining the
-.Ev PAGER
-variable.
-.It Fl s Ar srcdir
-The location of the
-.Nx
-sources files used to create the reference files.
-By default this is
-.Pa /usr/src/etc
-but it can be changed either with this option
-or the
-.Ev SRCDIR
-variable.
-.It Fl t Ar temproot
-Specifies the location of the
-.Pa temproot
-directory.
-The temporary reference files created from
-.Pa /usr/src/etc
-will be stored there.
-By default this is
-.Pa /tmp/temproot
-but can be changed either with this option or the
-.Ev TEMPROOT
-environment variable.
-.It Fl v
-Makes
-.Nm
-verbose about its actions.
-.It Fl w Ar width
-Sets screen width used during interactive merge.
-By default this is the number of columns
-.Xr stty 1
-reports but it can be changed either with this
-option or by defining the
-.Ev WIDTH
-variable.
-This is useful for
-.Xr xterm 1
-users with wider shell windows.
-.El
-.Sh ENVIRONMENT
-.Bl -tag -width IGNOREFILESXX
-.It Ev TEMPROOT
-Sets a default value for
-.Pa temproot .
-See
-.Fl t
-above.
-.It Ev SRCDIR
-The location of the
-.Nx
-sources files.
-See
-.Fl s
-above.
-.It Ev PAGER
-The pager to use when displaying files.
-See
-.Fl p
-above.
-.It Ev WIDTH
-The screen width used during interactive merge.
-See
-.Fl w
-above.
-.It Ev IGNOREFILES
-A list of files that
-.Nm
-should ignore.
-Files listed in this
-variable will never be considered for updating by
-.Nm .
-.El
-.Sh FILES
-The environment variables can also be defined in the following configuration
-files.
-The user's personal configuration file settings override the global
-settings.
-.Pp
-/etc/etcupdate.conf
-.Pp
-~/.etcupdaterc
-.Sh EXAMPLES
-You have just upgraded your
-.Nx
-host from 1.6 to 1.6.1 and now it's time
-to update the configuration files as well.
-To update the configuration files from the sources (if you have the
-.Pa /usr/src/etc
-directory):
-.Pp
-.Dl etcupdate
-.Pp
-The default location of the source files is
-.Pa /usr/src/etc
-but this may be overridden with the
-.Fl s Ar srcdir
-command line argument:
-.Pp
-.Dl etcupdate -s /some/where/src/etc
-.Pp
-To update the configuration files from binary distribution sets
-do something like this:
-.Pp
-.Dl mkdir /tmp/temproot
-.Dl cd /tmp/temproot
-.Dl tar xpzf /some/where/etc.tgz
-.Dl etcupdate -b /tmp/temproot
-.Pp
-You have modified only few files in the
-.Pa /etc
-directory so you would like install most of the updates without being asked.
-To automatically update the unmodified configuration files:
-.Pp
-.Dl etcupdate -a
-.Pp
-To get a better idea what's going on, use the
-.Fl v
-flag:
-.Pp
-.Dl etcupdate -v
-.Sh SEE ALSO
-.Xr cmp 1 ,
-.Xr more 1 ,
-.Xr rcs 1 ,
-.Xr sdiff 1 ,
-.Xr stty 1 ,
-.Xr aliases 5
-.Sh HISTORY
-The
-.Nm
-command appeared in
-.Nx 1.6 .
-.Sh AUTHORS
-The script was written by
-.An Martti Kuparinen
-.Aq martti@NetBSD.org
-and improved by several other
-.Nx
-users.
-.Pp
-The idea for this script (including code fragments, variable names etc.)
-came from the
-.Fx
-mergemaster (by Douglas Barton).
-Unlike the
-.Fx
-mergemaster, this does not use CVS version tags by default to compare if
-the files need to be updated.
-Files are compared with
-.Xr cmp 1
-as this is more reliable and the only way if the version numbers are the
-same even though the files are different.
-.\" when exactly are the version the same even though the file changes?
-.\" .Pp
-.\" .Sh BUGS
-.\" Because of the use of
-.\" .Xr cmp 1
-.\" to compare files, rather than CVS versions, files that are locally changed
-.\" from the distribution are always considered needing to be updated.