# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
# 
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

# Configuration information for AFS client

# AFS_CLIENT and AFS_SERVER determine if we should start the client and or
# the bosserver. Possible values are on and off.
AFS_CLIENT=on
AFS_SERVER=off

# AFS client configuration options:
# A "normal" memcache based default.  20MB of cache
NORMAL="-memcache -daemons 3 -blocks 20480"
# A "server" doing heavier AFS I/O: disk cache, set cache size in 
#    /etc/openafs/cacheinfo
SERVER="-daemons 5 -chunksize 18 -volumes 512"

OPTIONS="$NORMAL -nosettime -afsdb -dynroot -fakestat"

# Set some sane sysnames -- figure out what we are
_ARCH=`uname -i | sed 's/x86_64/amd64/'`
_KERN=`uname -r | sed 's/\([0-9]\+\)\.\([0-9]\+\)\..*/\1\2/'`
_DIST=""

for d in fedora centos redhat ; do
    if [ -f "/etc/$d-release" ] ; then
        _DIST=$d
        break
    fi
done

# What version of the distribution are we?  Cut off the Client|Server
# mess from RHEL
_REL=`/bin/rpm -qf --qf '%{version}\n' /etc/${_DIST}-release | sed 's/\([0-9]\+\)[a-zA-Z]\+/\1/'`

# Sysname list.  The order here is from specific to general, with a
# fallback to the compiled-in value from /usr/bin/sys.  This will be
# used as the sysname search path.
SYSNAMELIST="${_ARCH}_${_DIST}_${_REL} ${_ARCH}_linux${_KERN} $(/usr/bin/sys)"

# Set to "-verbose" for a lot of debugging information from afsd. Only
# useful for debugging as it prints _a lot_ of information.
VERBOSE=

# AFSD_OPTIONS are the options passed to afsd.
AFSD_OPTIONS="$OPTIONS $VERBOSE"


# Sample server preferences function. Set server preferences using this.
# afs_serverprefs() {
#    /usr/afsws/etc/fs setserverprefs <host> <rank>
#}

afs_post_init() {
    /usr/bin/fs setcrypt -crypt on
}

# Either the name of an executable script or a set of commands go here.
# AFS_POST_INIT=afs_serverprefs
AFS_POST_INIT=afs_post_init

# Directory to mount AFS under (usually /afs)
AFS_MOUNT_POINT="/afs"

# Directory to use for the cache directory
AFS_CACHE_DIR="/var/cache/openafs"

# Directory to use for configuration information
AFS_CONF_DIR="/etc/openafs"
