xref: /freebsd/contrib/pjdfstest/tests/conf (revision 3e11bd9e2a2b1cbd4283c87c93e3cc75e3f2dacb)
1# $FreeBSD: head/tools/regression/pjdfstest/tests/conf 211354 2010-08-15 21:29:03Z pjd $
2# pjdfstest configuration file
3
4# Supported operating systems: FreeBSD, Darwin, SunOS, Linux
5os=`uname`
6
7case "${os}" in
8FreeBSD|Darwin)
9	GREP=grep
10	#fs=`df -T . | tail -1 | awk '{print $2}'`
11	pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
12	fs=`mount | ${GREP} -E "^${pattern}" | awk -F '[(,]' '{print toupper($2)}'`
13	;;
14Solaris|SunOS)
15	GREP=ggrep
16	pattern=`df -Pk . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`
17	fs=`mount -v | ${GREP} -E "^${pattern}" | awk '{print $5}' | \
18	    tr -s '[:lower:]' '[:upper:]'`
19	;;
20Linux)
21	GREP=grep
22	fs=`df -PT . | tail -1 | awk '{print toupper($2)}'`
23	;;
24*)
25	echo "Unsupported operating system ${os}." >/dev/stderr
26	exit 1
27	;;
28esac
29
30# If we cannot figure out file system type, define it here.
31#fs="UFS"
32
33if [ -z "${fs}" ]; then
34	echo "Cannot figure out file system type, define it by hand." >/dev/stderr
35	exit 1
36fi
37