summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-08-02 05:58:30 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-08-02 05:58:30 +0000
commitfa3daf8404559e0e8fe0ecf6ddd0db96ed57b171 (patch)
treec838e5ebca47d69ea0798194d24709db831fdd7c
parent88a142950f9858026e4fed6a7e81299a6c21f8c1 (diff)
Only run mtree if we install a patch.
-rw-r--r--usr.sbin/syspatch/syspatch.sh10
1 files changed, 6 insertions, 4 deletions
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 <ajacoutot@openbsd.org>
#
@@ -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