diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2013-03-02 09:11:16 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2013-03-02 09:11:16 +0000 |
commit | 6c99b330acd6bfcbe8a330f307c9289d048188fd (patch) | |
tree | 5a45a983f34b72cb27eca0b455ca5f41c0501eb3 | |
parent | 5d4cb6756feeb008443923f91ed98dbae5c3020d (diff) |
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.sh | 12 |
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 |