]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
linux-rc-wait-for-salvager-20051002
authorJoe Buehler <jbuehler@spirentcom.com>
Mon, 3 Oct 2005 04:13:26 +0000 (04:13 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 3 Oct 2005 04:13:26 +0000 (04:13 +0000)
FIXES 21754

rc file hack to wait for salvage to finish

src/afsd/afs.conf.linux
src/afsd/afs.rc.linux

index be41530c44db920a02ad83691434ee0812d7ff09..456d0732e01c0e056c54c3aa21ae3a8c87b80552 100644 (file)
@@ -79,6 +79,10 @@ CACHESIZE=AUTOMATIC
 OPTIONS=AUTOMATIC
 #OPTIONS=$SMALL
 
+# force startup script to wait for salvage to finish before proceeding
+# with machine boot
+WAIT_FOR_SALVAGE=no
+
 # you should never need to change these settings
 AFSDIR=/afs
 CACHEDIR=/usr/vice/cache
index 5b2405df8b2d1cbd238f80ae6b0985fb7095274f..9591579d084e402f518dd617d5e12d39befa0e83 100644 (file)
@@ -282,6 +282,14 @@ case "$1" in
        if  is_on $AFS_SERVER && test -x /usr/afs/bin/bosserver  ; then
                /usr/afs/bin/bosserver 
                test "$afs_rh" && touch /var/lock/subsys/afs
+               if is_on $WAIT_FOR_SALVAGE; then
+                       # wait for fileserver to finish salvaging
+                       sleep 10
+                       while /usr/bin/bos status localhost fs 2>&1 | grep 'Auxiliary.*salvaging'; do
+                               echo "Waiting for salvager to finish..... "
+                               sleep 10
+                       done
+               fi
        fi
 
        # Start AFS client