[16623] 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 22:12:22 1999

To: bug-infoagents@MIT.EDU
Date: Tue, 19 Jan 1999 22:12:25 EST
From: Marc Horowitz <marc@MIT.EDU>

Ignore that last diff.  Use this one.

*** /mit/infoagents/bin/netscape	Fri Jan 15 13:57:27 1999
--- /tmp/netscape	Tue Jan 19 22:07:57 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
!     warn=`${gnubin}/gdu -sk ${HOME}/.netscape/cache | \
! 	awk '{if ($1>10) { print $1 } else { print "nowarn"}}'`
!     case "$warn" in
! 	nowarn)
! 	    ;;
! 	*)
! 	    echo ""
! 	    echo ' **** Netscape is eating '$warn'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