[1953] in SIPB_Linux_Development

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

Clearing the cache after an unclean shutdown

daemon@ATHENA.MIT.EDU (Salvatore Valente)
Mon Dec 8 16:13:06 1997

Date: Mon, 8 Dec 1997 16:10:25 -0500
To: linux-dev@MIT.EDU
From: Salvatore Valente <svalente@MIT.EDU>


I've installed these changes to athena.init and rc.athena on snork.
Unless anyone sees any bugs or problems, I'll commit them to the
source tree and install them in the system packs and make a new
athena-rc package.

-Sal.

diff -c -r1.5 athena.init
*** athena.init	1997/08/23 22:04:30	1.5
--- athena.init	1997/12/08 20:59:09
***************
*** 16,21 ****
--- 13,22 ----
  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0
  
+ # Files used to clean up the AFS cache
+ CacheItems=/usr/vice/cache/CacheItems
+ CacheClean=/usr/vice/cache/CacheClean
+ 
  # See how we were called.
  case "$1" in
    start)
***************
*** 54,59 ****
--- 55,61 ----
  		sleep 10
  		/sbin/rmmod libafs
  		rm -f /var/run/afsd.pid
+ 		touch $CacheClean
  	fi
  
  	echo "done"

diff -c -r1.6 rc.athena
*** rc.athena	1997/09/23 03:54:10	1.6
--- rc.athena	1997/12/08 20:59:15
***************
*** 23,28 ****
--- 23,36 ----
  
  # Load up AFS
  if [ "${AFSCLIENT}" = "true" ]; then
+ 	# Variable inherited from athena.init.
+ 	if [ ! -z "$CacheClean" ]; then
+ 		if [ ! -f "$CacheClean" ]; then
+ 			echo "Clearing the AFS cache."
+ 			rm -f $CacheItems
+ 		fi
+ 		rm -f $CacheClean
+ 	fi
  	if [ -r /etc/rc.d/rc.afs ]; then
  		echo "Starting AFS client: "
  		. /etc/rc.d/rc.afs

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