2 # Copyright 2000, International Business Machines Corporation and others.
5 # This software has been released under the terms of the IBM Public
6 # License. For details, see the LICENSE file in the top-level source
7 # directory or online at http://www.openafs.org/dl/license10.html
11 CONFIG=$VICEETC/config
12 AFSDOPT=$CONFIG/afsd.options
13 PACKAGE=$CONFIG/package.options
15 LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
16 MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
17 SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
19 if [ -f $AFSDOPT ]; then
20 OPTIONS=`cat $AFSDOPT`
25 # Need the commands ps, awk, kill, sleep
26 PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
27 if kldstat | grep -q afs.ko ; then
30 if [ -f $VICEETC/afs.ko ]; then
31 echo "Loading AFS kernel extensions"
32 kldload $VICEETC/afs.ko
34 echo "$VICEETC/afs.ko does not exist. Skipping AFS startup."
38 if kldstat | grep -q afs.ko ; then
41 echo "AFS kernel extensions failed to initialize. Skipping AFS startup."
46 # Start the AFS server processes if a bosserver exists
49 if [ -x /usr/afs/bin/bosserver ]; then
50 echo "Starting AFS Server processes"
51 /usr/afs/bin/bosserver
52 OPTIONS="$OPTIONS -nosettime"
57 # Check that all of the client configuration files exist
60 for file in $AFSD $VICEETC/cacheinfo \
61 $VICEETC/ThisCell $VICEETC/CellServDB
63 if [ ! -f ${file} ]; then
64 echo "${file} does not exist. Not starting AFS client."
70 # Check that the root directory for AFS (/afs)
71 # and the cache directory (/usr/vice/cache) both exist
74 for dir in `awk -F: '{print $1, $2}' $VICEETC/cacheinfo`
76 if [ ! -d ${dir} ]; then
77 echo "${dir} does not exist. Not starting AFS client."
86 # Run package to update the disk
88 if [ -f /usr/afsws/etc/package -a -f $PACKAGE ]; then
89 /usr/afsws/etc/package -v -o `cat $PACKAGE` > /dev/console 2>&1
92 (echo "Package completed successfully") > /dev/console 2>&1
93 date > /dev/console 2>&1
96 (echo "Rebooting to restart system") > /dev/console 2>&1
101 (echo "Package update failed; continuing") > /dev/console 2>&1
108 # Start AFS inetd services
109 # (See the AFS Command Ref. for notes on the proper configuration of inetd.afs)
111 if [ -f /usr/sbin/inetd.afs -a -f /etc/inetd.conf.afs ]; then
112 /usr/sbin/inetd.afs /etc/inetd.conf.afs