summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajacoutot <ajacoutot@openbsd.org>2013-03-02 09:11:15 +0000
committerajacoutot <ajacoutot@openbsd.org>2013-03-02 09:11:15 +0000
commit4724778150a59c6004843d51feaec24a4111af1d (patch)
tree3d494bd21cf941df34c2f477cf7c440063516320
parentWhen using an external password quality check program, do not run the (diff)
downloadwireguard-openbsd-4724778150a59c6004843d51feaec24a4111af1d.tar.xz
wireguard-openbsd-4724778150a59c6004843d51feaec24a4111af1d.zip
Always compare aliases(5) at the end of the sysmerge(8) run after all
files have already been merged. This is needed in the case where the syntax of smtpd.conf changed to prevent newaliases(8) from failing. issue reported by todd@ ok sthen@
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index 076ab07d61a..8e1fef192be 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.102 2013/01/25 13:32:49 ajacoutot Exp $
+# $OpenBSD: sysmerge.sh,v 1.103 2013/03/02 09:11:15 ajacoutot Exp $
#
# Copyright (c) 2008-2013 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
@@ -527,17 +527,19 @@ diff_loop() {
}
sm_compare() {
- local _c1 _c2 COMPFILE CVSID1 CVSID2
+ local _c1 _c2 _c3 COMPFILE CVSID1 CVSID2
echo "===> Starting comparison"
cd ${TEMPROOT} || error_rm_wrkdir
# use -size +0 to avoid comparing empty log files and device nodes;
# however, we want to keep the symlinks; group and master.passwd
- # need to be handled first in case install_file needs a new user/group
+ # need to be handled first in case install_file needs a new user/group;
+ # aliases(5) needs to be handled last in case smtpd.conf(5) syntax changes
_c1="./etc/group ./etc/master.passwd"
- _c2=$(find . -type f -size +0 -or -type l | grep -vE '(./etc/group|./etc/master.passwd)')
- for COMPFILE in ${_c1} ${_c2}; do
+ _c2=$(find . -type f -size +0 -or -type l | grep -vE '^./etc/(group|master.passwd|mail/aliases)$')
+ _c3=$(find . -type f -name aliases)
+ for COMPFILE in ${_c1} ${_c2} ${_c3}; do
unset IS_BINFILE
unset IS_LINK
# links need to be treated in a different way