aboutsummaryrefslogtreecommitdiff
path: root/tools/regression/fstest/tests/conf
blob: 05e099a593996e58666bae03afb27d7924ccbc35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $FreeBSD: src/tools/regression/fstest/tests/conf,v 1.3.2.1.6.1 2010/12/21 17:09:25 kensmith Exp $
# fstest configuration file

# Known operating systems: FreeBSD, SunOS, Linux
os=`uname`

case "${os}" in
FreeBSD|Darwin)
	GREP=grep
	#fs=`df -T . | tail -1 | awk '{print $2}'`
	pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
	fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}'`
	;;
Solaris|SunOS)
	GREP=ggrep
	pattern=`df -k . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`
	fs=`mount -v | egrep "^${pattern}" | awk '{print $5}' | \
	    tr -s '[:lower:]' '[:upper:]'`
	;;
Linux)
	GREP=grep
	fs=`df -PT . | tail -1 | awk '{print $2}'`
	;;
*)
	echo "Unsupported operating system ${os}." >/dev/stderr
	exit 1
	;;
esac

# If we cannot figure out file system type, define it here.
#fs="UFS"

if [ -z "${fs}" ]; then
	echo "Cannot figure out file system type, define it by hand." >/dev/stderr
	exit 1
fi