From 5de60e100f269e191cdd708e0113de9345e79369 Mon Sep 17 00:00:00 2001 From: mrg Date: Sat, 1 Mar 2003 12:59:54 +0000 Subject: [PATCH] allow /etc/etcupdate.conf (and ~/.etcupdate.conf) to set IGNOREFILES to a list of files that etcupdate will ignore; never considering them for updating. --- usr.sbin/etcupdate/etcupdate | 10 +++++++++- usr.sbin/etcupdate/etcupdate.8 | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/usr.sbin/etcupdate/etcupdate b/usr.sbin/etcupdate/etcupdate index 3d8f525a06e4..d0d7c756bcfc 100644 --- a/usr.sbin/etcupdate/etcupdate +++ b/usr.sbin/etcupdate/etcupdate @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: etcupdate,v 1.10 2003/02/04 08:33:03 martti Exp $ +# $NetBSD: etcupdate,v 1.11 2003/03/01 12:59:54 mrg Exp $ # # Copyright (c) 2001 The NetBSD Foundation, Inc. # All rights reserved. @@ -417,6 +417,14 @@ if [ -z "${CONTINUE}" ]; then 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 diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index f9d66dd30dcc..a17201257a72 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: etcupdate.8,v 1.4 2003/02/14 16:11:35 grant Exp $ +.\" $NetBSD: etcupdate.8,v 1.5 2003/03/01 12:59:55 mrg Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -158,6 +158,12 @@ variable. This is useful for .Xr xterm 1 users with wider shell windows. +.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 @@ -232,3 +238,10 @@ 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.