source: trunk/debathena/debathena/dotfiles/ @ 23832

Revision 23832, 1.6 KB checked in by geofft, 15 years ago (diff)
In dotfiles: * Also don't run 'mailquota' on EXCHANGE.MIT.EDU accounts for now (although as of mitmailutils >= 10.1.0-0debathena3, this is only a cosmetic problem).
[22631]3# $Id:,v 1.4 2007-04-09 17:13:19 ghudson Exp $
[22517]5# Determine the user's home directory usage and quota.
[22913]6qline=`quota.debathena -v -f "$USER" | awk '/^\// {print}'`
[22517]7usage=`echo "$qline" | awk '{print $2}'`
8quota=`echo "$qline" | awk '{print $3}'`
[22631]9quota90=`expr "${quota:-0}" \* 9 / 10`
[22631]11if [ -n "$usage" -a -n "$quota" ] && [ "$usage" -ge "$quota" ]; then
[22517]12  zenity --error --text="
13Your home directory usage exceeds your quota (${usage}KB
14used out of ${quota}KB).  You will be unable to use
15Athena normally until you free up space by deleting
16unneeded files.  You may find the following command
17useful to identify unneeded files:
19  athrun consult helpquota"
[22631]20elif [ -n "$usage" -a -n "$quota90" ] && [ "$usage" -ge "$quota90" ]; then
[22565]21  zenity --info --text="
[22517]22Your home directory usage is near your quota (${usage}KB
23used out of ${quota}KB).  Consider removing unneeded
24files to free up space.  You may find the following
25command useful to identify unneeded files:
27  athrun consult helpquota"
[23832]30# mitmailutils doesn't do Exchange yet
31if hesinfo "$USER" pobox | grep -q EXCHANGE; then
32  exit
[22517]35# Determine the user's mail usage and quota.
36qline=`mailquota | tail +2`
37usage=`echo "$qline" | awk '{print $2}'`
38quota=`echo "$qline" | awk '{print $3}'`
[22631]39quota90=`expr "${quota:-0}" \* 9 / 10`
[22631]41if [ -n "$usage" -a -n "$quota90" ] && [ "$usage" -ge "$quota90" ]; then
[22565]42  zenity --info --text="
[22517]43Your MIT mail usage is close to or exceeding your mail
44quota (${usage}KB used out of ${quota}KB).  Consider
45removing unneeded mail messages to free up space.  You
46may find the following command useful to identify which
47mail folders need the most attention:
49  mailusage"
Note: See TracBrowser for help on using the repository browser.