From bb444e86f0275e87a93908324a156af360ad5f36 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Fri, 9 Jun 2017 07:32:26 +0000 Subject: [PATCH] /etc/mtree/BSD.x11.dist is part of base, not X; so check for /var/sysmerge/xetc.tgz to detect whether we have the x sets installed. --- usr.sbin/syspatch/syspatch.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 425820b7e62..9f84c94d59a 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.112 2017/05/27 09:05:25 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.113 2017/06/09 07:32:26 ajacoutot Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot # @@ -246,7 +246,7 @@ rollback_patch() sp_cleanup() { - local _d _k _m + local _d _k # remove non matching release /var/syspatch/ content for _d in ${_PDIR}/{.[!.],}*; do @@ -262,9 +262,9 @@ sp_cleanup() done # in case a patch added a new directory (install -D) - for _m in /etc/mtree/{4.4BSD,BSD.x11}.dist; do - [[ -f ${_m} ]] && mtree -qdef ${_m} -p / -U >/dev/null - done + 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 } unpriv() @@ -297,7 +297,6 @@ _MIRROR=$(while read _line; do _line=${_line%%#*}; [[ -n ${_line} ]] && print -r -- "${_line}"; done /dev/null [[ ${_MIRROR} == @(file|http|https)://*/*[!/] ]] || sp_err "${0##*/}: invalid URL configured in /etc/installurl" - _MIRROR="${_MIRROR}/syspatch/${_KERNV[0]}/$(machine)" (($(sysctl -n hw.ncpufound) > 1)) && _BSDMP=true || _BSDMP=false -- 2.20.1