#! /bin/ksh
#
# Getlocalfs - create a list of all local filesystems.
#
# Version: 1994/11/17.
#
# Usage: Getlocalfs [/excludeddir1 [/excludeddir2] ... ]
#
#
# Set the list of directories not to be scanned.
#
dirlist="$@"
#
# Load the system-dependent parameters.
#
if [ -f /usr/local/bin/Getsystemoptions ]; then
   . /usr/local/bin/Getsystemoptions
else
   echo "*** $0 can't find /usr/local/bin/Getsystemoptions ***"
   exit 1
fi
#
# Figure out which directories to search: get all the file system names
# from a 'df' command, asking only for locally-mounted names if possible.
#
for d in `$dflocal | grep '^/dev/' | sed 's/.* //'`
do
   realdir=$d
   if [ "$ostype" = "Domain/OS" ]; then
      realdir=`echo $d | sed "s'//$host''"`
      if [ "$realdir" = "" ]; then
	 realdir="/"
      fi
   fi
   for t in $dirlist
   do
      if [ "$realdir" = "$t" ]; then
         continue 2
      fi
   done
   echo "$realdir"
done
#
#
exit 0
#
# End of Getlocalfs.
#
