From fa3daf8404559e0e8fe0ecf6ddd0db96ed57b171 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Wed, 2 Aug 2017 05:58:30 +0000 Subject: Only run mtree if we install a patch. --- usr.sbin/syspatch/syspatch.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'usr.sbin/syspatch/syspatch.sh') diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 4e7974ae4ba..76303b17ef5 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.119 2017/08/01 11:13:23 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.120 2017/08/02 05:58:29 ajacoutot Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot # @@ -319,7 +319,9 @@ if ((OPTIND == 1)); then apply_patch ${_OSrev}-${_PATCH} done # in case a patch added a new directory (install -D) - mtree -qdef /etc/mtree/4.4BSD.dist -p / -U >/dev/null - [[ ! -f /var/sysmerge/xetc.tgz ]] || - mtree -qdef /etc/mtree/BSD.x11.dist -p / -U >/dev/null + if [[ -n ${_PATCHES} ]]; then + mtree -qdef /etc/mtree/4.4BSD.dist -p / -U >/dev/null + [[ ! -f /var/sysmerge/xetc.tgz ]] || + mtree -qdef /etc/mtree/BSD.x11.dist -p / -U >/dev/null + fi fi -- cgit v1.2.3