summaryrefslogtreecommitdiff
path: root/usr.sbin/syspatch/syspatch.sh
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-11-14 09:09:21 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-11-14 09:09:21 +0000
commit52ae8506af315678162d56642aaf7dfc3776f0df (patch)
treed81219222a2032ebd864e69121dd573cab917f8f /usr.sbin/syspatch/syspatch.sh
parent1c6ad356fe7a0ffc202e4d90106263ebc47ec3f3 (diff)
uniq -> sort -u
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-rw-r--r--usr.sbin/syspatch/syspatch.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index fd1e888329a..2451b56b953 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.47 2016/11/12 22:22:25 halex Exp $
+# $OpenBSD: syspatch.sh,v 1.48 2016/11/14 09:09:20 ajacoutot Exp $
#
# Copyright (c) 2016 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -78,10 +78,11 @@ apply_patches()
checkfs()
{
+ # XXX check for available space
local _d _files="${@}"
[[ -n ${_files} ]]
- for _d in $(stat -qf "%Sd" ${_files} | uniq); do
+ for _d in $(stat -qf "%Sd" ${_files} | sort -u); do
mount | grep -v read-only | grep -q "^/dev/${_d} " ||
sp_err "Remote or read-only filesystem, aborting"
done
@@ -260,6 +261,7 @@ sp_cleanup()
done
}
+# XXX needs a way to match release <=> syspatch
# only run on release (not -current nor -stable)
set -A _KERNV -- $(sysctl -n kern.version |
sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q')