mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
linux-rc-update-20041217
update rc scripts for 2.6
This commit is contained in:
parent
937ba22002
commit
1c8ad1139c
@ -6,6 +6,12 @@
|
|||||||
# License. For details, see the LICENSE file in the top-level source
|
# License. For details, see the LICENSE file in the top-level source
|
||||||
# directory or online at http://www.openafs.org/dl/license10.html
|
# directory or online at http://www.openafs.org/dl/license10.html
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# On most linuces copy this file to
|
||||||
|
# /etc/sysconfig/afs
|
||||||
|
# so afs.rc can use it as config file.
|
||||||
|
############################################################################
|
||||||
|
|
||||||
# Configuration information for AFS client
|
# Configuration information for AFS client
|
||||||
|
|
||||||
# AFS_CLIENT and AFS_SERVER determine if we should start the client and or
|
# AFS_CLIENT and AFS_SERVER determine if we should start the client and or
|
||||||
@ -17,14 +23,49 @@ AFS_SERVER=off
|
|||||||
# Dynroot support (dynamically generated /afs), respectively, should be
|
# Dynroot support (dynamically generated /afs), respectively, should be
|
||||||
# enabled in the AFS client.
|
# enabled in the AFS client.
|
||||||
ENABLE_AFSDB=on
|
ENABLE_AFSDB=on
|
||||||
ENABLE_DYNROOT=off
|
ENABLE_DYNROOT=on
|
||||||
|
|
||||||
# AFS client configuration options:
|
# AFS client configuration options:
|
||||||
XXLARGE="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
|
# ---------------------------------------------------------------------------
|
||||||
XLARGE="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
|
# possible AFS client afsd configuration options (from 1.3.74) are
|
||||||
LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
|
# -blocks The number of blocks available in the workstation cache.
|
||||||
MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
|
# -files The target number of files in the workstation cache (Default:
|
||||||
SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
|
# 1000).
|
||||||
|
# -rootvol The name of the root volume to use.
|
||||||
|
# -stat The number of stat cache entries.
|
||||||
|
# -hosts List of servers to check for volume location info FOR THE
|
||||||
|
# HOME CELL.
|
||||||
|
# -memcache Use an in-memory cache rather than disk.
|
||||||
|
# -cachedir The base directory for the workstation cache.
|
||||||
|
# -mountdir The directory on which the AFS is to be mounted.
|
||||||
|
# -confdir The configuration directory .
|
||||||
|
# -nosettime Don't keep checking the time to avoid drift.
|
||||||
|
# -verbose Be chatty.
|
||||||
|
# -debug Print out additional debugging info.
|
||||||
|
# -kerndev [OBSOLETE] The kernel device for AFS.
|
||||||
|
# -dontfork [OBSOLETE] Don't fork off as a new process.
|
||||||
|
# -daemons The number of background daemons to start (Default: 2).
|
||||||
|
# -rmtsys Also fires up an afs remote sys call (e.g. pioctl, setpag)
|
||||||
|
# support daemon
|
||||||
|
# -chunksize [n] 2^n is the chunksize to be used. 0 is default.
|
||||||
|
# -dcache The number of data cache entries.
|
||||||
|
# -biods Number of bkg I/O daemons (AIX3.1 only)
|
||||||
|
# -prealloc Number of preallocated "small" memory blocks
|
||||||
|
# -pininodes Number of inodes which can be spared from inode[] for
|
||||||
|
# pointing at Vfiles. If this is set too high, you may have
|
||||||
|
# system problems, which can only be ameliorated by changing
|
||||||
|
# NINODE (or equivalent) and rebuilding the kernel.
|
||||||
|
# This option is now disabled.
|
||||||
|
# -logfile Place where to put the logfile (default in <cache>/etc/AFSLog.
|
||||||
|
# -waitclose make close calls always synchronous (slows em down, tho)
|
||||||
|
# -files_per_subdir [n] number of files per cache subdir. (def=2048)
|
||||||
|
# -shutdown Shutdown afs daemons
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
XXLARGE="-fakestat -stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
|
||||||
|
XLARGE="-fakestat -stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
|
||||||
|
LARGE="-fakestat -stat 2800 -dcache 2400 -daemons 5 -volumes 128"
|
||||||
|
MEDIUM="-fakestat -stat 2000 -dcache 800 -daemons 3 -volumes 70"
|
||||||
|
SMALL="-fakestat -stat 300 -dcache 100 -daemons 2 -volumes 50"
|
||||||
|
|
||||||
# cachesize and according options are set by /afs/rc.d/init.d/afs
|
# cachesize and according options are set by /afs/rc.d/init.d/afs
|
||||||
# * if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
|
# * if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
|
||||||
@ -33,8 +74,10 @@ SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
|
|||||||
# of options based on the cache size
|
# of options based on the cache size
|
||||||
# otherwise the values specified here will be used. So be careful!
|
# otherwise the values specified here will be used. So be careful!
|
||||||
# Note: if you leave these as-is, no changes are made.
|
# Note: if you leave these as-is, no changes are made.
|
||||||
CACHESIZE=
|
CACHESIZE=AUTOMATIC
|
||||||
OPTIONS=$MEDIUM
|
#CACHESIZE=50000
|
||||||
|
OPTIONS=AUTOMATIC
|
||||||
|
#OPTIONS=$SMALL
|
||||||
|
|
||||||
# you should never need to change these settings
|
# you should never need to change these settings
|
||||||
AFSDIR=/afs
|
AFSDIR=/afs
|
||||||
|
@ -59,6 +59,7 @@ runcmd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SYSCNF=/etc/sysconfig/afs
|
SYSCNF=/etc/sysconfig/afs
|
||||||
|
KERNEL_VERSION=`uname -r`
|
||||||
|
|
||||||
# Gather up options and post startup script name, if present
|
# Gather up options and post startup script name, if present
|
||||||
if [ -f $SYSCNF ] ; then
|
if [ -f $SYSCNF ] ; then
|
||||||
@ -104,9 +105,14 @@ choose_client() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# For now, just use uname -r to get the module version.
|
# For now, just use uname -r to get the module version.
|
||||||
VERSION=`uname -r`
|
case $KERNEL_VERSION in
|
||||||
|
[1-2].[0-5].*)
|
||||||
LIBAFS=libafs-$VERSION$MP.o
|
LIBAFS=libafs-$KERNEL_VERSION$MP.o
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LIBAFS=libafs-$KERNEL_VERSION$MP.ko
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -117,8 +123,14 @@ choose_client() {
|
|||||||
# unregister_filesystem_Rsmp_b240cad8 is a typcial SMP version string from
|
# unregister_filesystem_Rsmp_b240cad8 is a typcial SMP version string from
|
||||||
# a kernel built from ftp.kernel.org
|
# a kernel built from ftp.kernel.org
|
||||||
#
|
#
|
||||||
|
case $KERNEL_VERSION in
|
||||||
KSYMS_FILE=/proc/ksyms
|
[1-2].[0-5].*)
|
||||||
|
KSYMS_FILE=/proc/ksyms
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
KSYMS_FILE=/proc/kallsyms
|
||||||
|
;;
|
||||||
|
esac
|
||||||
SEARCH_STR="unregister_filesystem"
|
SEARCH_STR="unregister_filesystem"
|
||||||
DEFAULT_SMP_PREFIX="smp_" # Redhat kernels need "smp" instead
|
DEFAULT_SMP_PREFIX="smp_" # Redhat kernels need "smp" instead
|
||||||
PREFIX="" # none needed for UP with <= 1Gig memory
|
PREFIX="" # none needed for UP with <= 1Gig memory
|
||||||
@ -129,8 +141,16 @@ set_prefix()
|
|||||||
h8="$h$h$h$h$h$h$h$h"
|
h8="$h$h$h$h$h$h$h$h"
|
||||||
prefix_set=0
|
prefix_set=0
|
||||||
|
|
||||||
set X `fgrep $SEARCH_STR $KSYMS_FILE 2> /dev/null`; shift
|
set X `egrep "\<$SEARCH_STR" $KSYMS_FILE 2> /dev/null`; shift
|
||||||
str=$2
|
|
||||||
|
case $KERNEL_VERSION in
|
||||||
|
[1-2].[0-5].*)
|
||||||
|
str=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
str=$3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
case $str in
|
case $str in
|
||||||
${SEARCH_STR}_R$h8)
|
${SEARCH_STR}_R$h8)
|
||||||
# No prefix required
|
# No prefix required
|
||||||
@ -179,8 +199,15 @@ load_client() {
|
|||||||
|
|
||||||
if [ -f $KSYMS_FILE ]; then
|
if [ -f $KSYMS_FILE ]; then
|
||||||
# use the prefix command if required
|
# use the prefix command if required
|
||||||
set_prefix
|
case $KERNEL_VERSION in
|
||||||
/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
|
[1-2].[0-5].*)
|
||||||
|
set_prefix
|
||||||
|
/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
|
/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user