summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge/sysmerge.sh
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2008-06-13 00:33:05 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2008-06-13 00:33:05 +0000
commit0c1bc4a0e8b8d5328ef132a97fd5e85b48ac992b (patch)
tree2ba3d46f81e1a93c49ad747be00e982a17764969 /usr.sbin/sysmerge/sysmerge.sh
parent4b5e1d77cab1b6ae110f1b3cadddf2ce739181c0 (diff)
- always force full file check on fbtab, login.conf, sysctl.conf and
ttys since they are created using helper scripts and comparing CVS Id would not be accurate original diff from sthen@ man page tweak from jmc@ ok sthen@ jdixon@ jmc@ naddy@
Diffstat (limited to 'usr.sbin/sysmerge/sysmerge.sh')
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index f08e18bcf8d..d8a43608757 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: sysmerge.sh,v 1.12 2008/06/10 00:36:46 pyr Exp $
+# $OpenBSD: sysmerge.sh,v 1.13 2008/06/13 00:33:04 ajacoutot Exp $
#
# This script is based on the FreeBSD mergemaster script, written by
# Douglas Barton <DougB@FreeBSD.org>
@@ -308,8 +308,13 @@ do_compare() {
fi
# compare CVS $Id's first so if the file hasn't been modified,
- # it will be deleted from temproot and ignored from comparison
- if [ "${AUTOMODE}" ]; then
+ # it will be deleted from temproot and ignored from comparison.
+ # several files are generated from scripts so CVS ID is not a
+ # reliable way of detecting changes; leave for a full diff.
+ if [ "${AUTOMODE}" -a "${COMPFILE}" != "./etc/fbtab" \
+ -a "${COMPFILE}" != "./etc/login.conf" \
+ -a "${COMPFILE}" != "./etc/sysctl.conf" \
+ -a "${COMPFILE}" != "./etc/ttys" ]; then
CVSID1=`grep "[$]OpenBSD:" ${DESTDIR}${COMPFILE#.} 2>/dev/null`
CVSID2=`grep "[$]OpenBSD:" ${COMPFILE} 2>/dev/null` || CVSID2=none
if [ "${CVSID2}" = "${CVSID1}" ]; then rm "${COMPFILE}"; fi