[16622] in Athena Bugs

home help back first fref pref prev next nref lref last post

cache quota warning

daemon@ATHENA.MIT.EDU (Marc Horowitz)
Tue Jan 19 21:52:23 1999

To: bug-infoagents@MIT.EDU
Date: Tue, 19 Jan 1999 21:52:23 EST
From: Marc Horowitz <marc@MIT.EDU>

 **** Netscape is eating 2K of your quota! ****
To correct, this situation, quit Netscape, and then run
    add infoagents
    netscape-fix
    cd
    rm -rf .netscape/cache

2k?  I find it difficult to be worried :-) This warning happens too
often.  If I use use cache in my homedir intentionally, then clear it
with the "clear disk quota" button in netscape, the directory
continues to exist.  This patch gives a little grace for a small cache
dir:

*** /mit/infoagents/bin/netscape	Fri Jan 15 13:57:27 1999
--- /tmp/netscape	Tue Jan 19 21:47:11 1999
***************
*** 148,161 ****
  
  # Warn if cache in wrong place
  if [ -d ${HOME}/.netscape/cache ]; then
!     quotagone=`${gnubin}/gdu -sk ${HOME}/.netscape/cache | awk '{print $1}'`
!     echo ""
!     echo ' **** Netscape is eating '$quotagone'K of your quota! ****'
!     echo "To correct, this situation, quit Netscape, and then run"
!     echo "    add infoagents"
!     echo "    netscape-fix"
!     echo "    cd"
!     echo "    rm -rf .netscape/cache"
  fi
  
  # Get default preferences if needed. 3.x and 4.x do it differently.
--- 148,168 ----
  
  # Warn if cache in wrong place
  if [ -d ${HOME}/.netscape/cache ]; then
!     set `${gnubin}/gdu -sk ${HOME}/.netscape/cache | \
! 	awk '{if ($1>10) { print $1, "warn" } else { print $1, "nowarn"}}'`
!     quotagone=$1
!     dowarn=$2
!     case "$dowarn" in
! 	warn)
! 	    echo ""
! 	    echo ' **** Netscape is eating '$quotagone'K of your quota! ****'
! 	    echo "To correct, this situation, quit Netscape, and then run"
! 	    echo "    add infoagents"
! 	    echo "    netscape-fix"
! 	    echo "    cd"
! 	    echo "    rm -rf .netscape/cache"
! 	    ;;
!     esac
  fi
  
  # Get default preferences if needed. 3.x and 4.x do it differently.


home help back first fref pref prev next nref lref last post