From: Rob Browning Date: Thu, 7 Nov 2013 18:29:37 +0000 (-0600) Subject: current-filesystem(): accommodate NetBSD and SunOS. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9ad0231fc606f7f30cc037643481311354a103ae;p=packages%2Fb%2Fbup.git current-filesystem(): accommodate NetBSD and SunOS. Thanks to Thomas Klausner for reporting the problem, and providing the alternate commands. Signed-off-by: Rob Browning --- diff --git a/t/lib.sh b/t/lib.sh index c0a6278..0ff33a5 100644 --- a/t/lib.sh +++ b/t/lib.sh @@ -38,7 +38,17 @@ realpath() current-filesystem() { - df -T . | awk 'END{print $2}' + local kernel="$(uname -s)" || return $? + case "$kernel" in + NetBSD) + df -G . | sed -En 's/.* ([^ ]*) fstype.*/\1/p' + ;; + SunOS) + df -g . | sed -En 's/.* ([^ ]*) fstype.*/\1/p' + ;; + *) + df -T . | awk 'END{print $2}' + esac } path-filesystems()