#!/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/quota-grp-report - show group quotas # # Creation: 01.01.2004 jb # Last Update: $Id$ # # Copyright (c) 2004-2008 Jens Berger # # 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 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- grpswitchfile=/var/quota/quota_grp_switch # reading eislib . /var/install/include/eislib if [ -f $grpswitchfile ]; then for mountpoint in `cat $grpswitchfile | cut -d: -f1`; do dev=`grep -E "[[:space:]]+$mountpoint[[:space:]]+" /etc/fstab | sed -e 's/[[:space:]]\+/ /g' | cut -d\ -f1` dev_type=`grep "$mountpoint:" $grpswitchfile | cut -d: -f2` if [ "$dev_type" = "vfsv0" ]; then for i in `quotaon -agp | grep $mountpoint | grep 'group quota' | grep 'is on' | cut -d\( -f2 | cut -d\) -f1`; do /usr/sbin/repquota -gs $i >>/tmp/quota-grp-report done elif [ "$dev_type" = "xfs" ]; then /usr/sbin/repquota -gs $mountpoint >>/tmp/quota-grp-report fi done clrhome if [ -f /tmp/quota-grp-report ]; then more /tmp/quota-grp-report else mecho -info "No group disk quotas defined." fi fi anykey rm -f /tmp/quota-grp-report