Module Name: src
Committed By: njoly
Date: Mon Sep 21 18:03:03 UTC 2009
Modified Files:
src/usr.sbin/postinstall: postinstall
Log Message:
Make do_mtree correctly report failure if either special or
NetBSD.dist checks failed, not only the last one.
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/usr.sbin/postinstall/postinstall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.103 src/usr.sbin/postinstall/postinstall:1.104
--- src/usr.sbin/postinstall/postinstall:1.103 Mon Sep 7 21:07:04 2009
+++ src/usr.sbin/postinstall/postinstall Mon Sep 21 18:03:03 2009
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.103 2009/09/07 21:07:04 mrg Exp $
+# $NetBSD: postinstall,v 1.104 2009/09/21 18:03:03 njoly Exp $
#
# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -923,8 +923,11 @@
do_mtree()
{
[ -n "$1" ] || err 3 "USAGE: do_mtree fix|check"
+ failed=0
compare_dir "$1" "${SRC_DIR}/etc/mtree" "${DEST_DIR}/etc/mtree" 444 special
+ failed=$(( ${failed} + $? ))
+
if ! $SOURCEMODE; then
MTREE_DIR="${SRC_DIR}/etc/mtree"
else
@@ -938,6 +941,9 @@
MTREE_DIR="${SCRATCHDIR}"
fi
compare_dir "$1" "${MTREE_DIR}" "${DEST_DIR}/etc/mtree" 444 NetBSD.dist
+ failed=$(( ${failed} + $? ))
+
+ return ${failed}
}
#