summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2011-05-08 09:49:35 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2011-05-08 09:49:35 +0000
commit3dc8acfe369aa6bd6bdc4a05995ebe9bf18d6e8b (patch)
tree9f2fb0bf3e79b9178dcf442754fbb21956833cd8
parent5b5b408a324c550ca04103475d9466e9511eeb6e (diff)
Make sure /etc/group and /etc/master.passwd are handled first in case we
need to install files or directories with newly added user/group ownerships. ok sthen@ (on a slightly different diff)
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index 6a368fae92f..9032c2edd64 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.72 2011/05/06 16:17:18 ajacoutot Exp $
+# $OpenBSD: sysmerge.sh,v 1.73 2011/05/08 09:49:34 ajacoutot Exp $
#
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
# Copyright (c) 2008, 2009, 2010 Antoine Jacoutot <ajacoutot@openbsd.org>
@@ -531,8 +531,11 @@ do_compare() {
cd ${TEMPROOT} || error_rm_wrkdir
# use -size +0 to avoid comparing empty log files and device nodes;
- # however, we want to keep the symlinks
- for COMPFILE in `find . -type f -size +0 -or -type l`; do
+ # however, we want to keep the symlinks; group and master.passwd
+ # need to be handled first in case mm_install needs a new user/group
+ local _c1="./etc/group ./etc/master.passwd"
+ local _c2=`find . -type f -size +0 -or -type l | grep -vE '(./etc/group|./etc/master.passwd)'`
+ for COMPFILE in ${_c1} ${_c2}; do
unset IS_BINFILE
unset IS_LINK
# links need to be treated in a different way