#!/bin/sh
#
# A script to extract the local, permanently mounted, real, filesystems.
# Tested on Solaris, Linux, IRIX
#
# Written by: Peter Eriksson <pen@lysator.liu.se> 2004-12-13
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH

if [ -f /etc/fstab ]; then
    awk '($1 ~ /^\/dev/ && $2 ~ /^\// && $4 !~ /noauto/) {print $2}' </etc/fstab | sort
elif [ -f /etc/vfstab ]; then
    awk '($1 ~ /^\/dev/ && $2 ~ /^\/dev/ && $3 ~ /^\//) { print $3 }' </etc/vfstab | sort
else
    echo 'ERROR: Can not find /etc/fstab or /etc/vfstab' >&2
    exit 1
fi

exit 0
