summaryrefslogtreecommitdiff
path: root/usr.sbin/syspatch/syspatch.sh
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-06-09 07:32:27 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-06-09 07:32:27 +0000
commitccf4dda582b08c53130626edb06f2baf44512106 (patch)
tree316ad65e42f61f17cb64812286c0aac8d00ed3e5 /usr.sbin/syspatch/syspatch.sh
parente093dd1e2dc44609931fe6c7e3bc13c659b4a590 (diff)
/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.
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-rw-r--r--usr.sbin/syspatch/syspatch.sh11
1 files 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 <ajacoutot@openbsd.org>
#
@@ -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 </etc/installurl | tail -1) 2>/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