#!/bin/sh
#
#     tiger - A UN*X security checking system
#     Copyright (C) 1993 Douglas Lee Schales, David K. Hess, David R. Safford
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 1, or (at your option)
#    any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#     Please see the file `COPYING' for the complete copyright notice.
#
# getdisks - 06/24/93
#
#-----------------------------------------------------------------------------
#

/etc/mount |
$AWK '$5 == "xfs" || $5 == "xfs" {print}' |
$SORT |
$AWK '
  BEGIN {lastdisk=""; fslist="";}
  {
    disk=substr($1, 1, length($1)-1);
    if(disk == lastdisk){
       fslist=fslist " " $3;
    }
    else {
	if(lastdisk != ""){
           printf("%s\n", fslist);
        }
        lastdisk=disk;
        fslist = $3;
    }
  }
  END { if(lastdisk != ""){
          printf("%s\n", fslist);
        } 
  }'

