diff options
author | kn <kn@cvs.openbsd.org> | 2019-02-10 21:11:43 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2019-02-10 21:11:43 +0000 |
commit | 6839b5fb0f75aec0846e98f02c772ca4c80ca0ab (patch) | |
tree | bea53f2cca36d3c3f390275c77a46be7dcc87f2f /libexec | |
parent | e2904b3fd04a1ef9a2bfe89cf5af4242ca0daa69 (diff) |
Simplify NFS check
Instead of getting all filesystems with df(1), filter /usr/share/ and check
with mount(1) whether it's NFS, make df error out directly if the
filesystem type matches nfs.
OK sthen tb
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/reorder_kernel/reorder_kernel.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/reorder_kernel/reorder_kernel.sh b/libexec/reorder_kernel/reorder_kernel.sh index ee14f7a096c..d8b8a2d24a0 100644 --- a/libexec/reorder_kernel/reorder_kernel.sh +++ b/libexec/reorder_kernel/reorder_kernel.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: reorder_kernel.sh,v 1.5 2018/05/01 09:45:39 rpe Exp $ +# $OpenBSD: reorder_kernel.sh,v 1.6 2019/02/10 21:11:42 kn Exp $ # # Copyright (c) 2017 Robert Peichaer <rpe@openbsd.org> # @@ -21,8 +21,7 @@ set -o errexit export PATH=/bin:/sbin:/usr/bin:/usr/sbin # Skip if /usr/share is on a nfs mounted filesystem. -DISK_DEV=$(df /usr/share | sed '1d;s/ .*//') -[[ $(mount | grep "^$DISK_DEV") == *" type nfs "* ]] && exit 1 +df -t nfs /usr/share >/dev/null 2>&1 && exit 1 KERNEL=$(sysctl -n kern.osversion) KERNEL=${KERNEL%#*} |