From: Jason McCormick Date: Sun, 20 Mar 2005 15:02:30 +0000 (+0000) Subject: STABLE14-linux-afsd-rc-better-defaulting-20050320 X-Git-Tag: openafs-devel-1_3_80~11 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=148579b1187b3edaae7b4f85d3aba8d35bf57d97;p=packages%2Fo%2Fopenafs.git STABLE14-linux-afsd-rc-better-defaulting-20050320 FIXES 17630 default to a small cache rather than breaking if the client is ill-configured (cherry picked from commit b0b3b02bd18c404d9323d1a060abbdfbdcc2e0af) --- diff --git a/src/afsd/afs.rc.linux b/src/afsd/afs.rc.linux index b704f465a..5b2405df8 100644 --- a/src/afsd/afs.rc.linux +++ b/src/afsd/afs.rc.linux @@ -220,9 +220,16 @@ generate_cacheinfo() { if [ "$PART" = "NONE" ]; then echo "$CACHE or /usr/vice is not a separate partition" echo "you have to change the cachesize in $SYSCNF by hand" - exit 1 + echo "AFS will be started with a VERY small cache of 8Mb." + CACHESIZE=8000 else - PARTSIZE=`echo $LINE | awk '{print $2}'` + # Check to see if df has pretty-printed for long dev (i.e. LVM) + FCHAR=`echo $LINE | cut -c 1` + if [ "$FCHAR" = "/" ]; then + PARTSIZE=`echo $LINE | awk '{print $2}'` + else + PARTSIZE=`echo $LINE | awk '{print $1}'` + fi CACHESIZE=`echo $PARTSIZE | awk '{printf "%d",int(($1*.8)/1000)*1000}'` fi fi