From: Joe Buehler Date: Mon, 3 Oct 2005 04:14:31 +0000 (+0000) Subject: STABLE14-linux-rc-wait-for-salvager-20051002 X-Git-Tag: openafs-stable-1_4_0-rc6~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5702ff618d30b0874c9ac9489b3c02561ef3ce44;p=packages%2Fo%2Fopenafs.git STABLE14-linux-rc-wait-for-salvager-20051002 FIXES 21754 rc file hack to wait for salvage to finish (cherry picked from commit abde1e6281ff1403e67c6f573dd10be4c892fb9a) --- diff --git a/src/afsd/afs.conf.linux b/src/afsd/afs.conf.linux index 4494024d2..6cdc675aa 100644 --- a/src/afsd/afs.conf.linux +++ b/src/afsd/afs.conf.linux @@ -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 diff --git a/src/afsd/afs.rc.linux b/src/afsd/afs.rc.linux index 5b2405df8..9591579d0 100644 --- a/src/afsd/afs.rc.linux +++ b/src/afsd/afs.rc.linux @@ -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