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
13 if [ "${NETWORKUP}" = "-NO-" ]; then exit; fi
15 if [ -r /var/db/openafs ]; then
16 VICEETC=/var/db/openafs/etc
22 CONFIG=$VICEETC/config
23 AFSDOPT=$CONFIG/afsd.options
24 PACKAGE=$CONFIG/package.options
26 LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
27 MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
28 SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
30 if [ -f $AFSDOPT ]; then
31 OPTIONS=`cat $AFSDOPT`
36 # Need the commands ps, awk, kill, sleep
37 PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
38 if kmodstat | grep -q openafs ; then
41 if [ -d $VICEETC/afs.kext ]; then
42 echo "Loading AFS kernel extensions"
43 kextload $VICEETC/afs.kext
45 echo "$VICEETC/afs.kext does not exist. Skipping AFS startup."
49 if kmodstat | grep -q openafs ; then
52 echo "AFS kernel extensions failed to initialize. Skipping AFS startup."
57 # Start the AFS server processes if a bosserver exists
60 if [ -x /usr/afs/bin/bosserver ]; then
61 echo "Starting AFS Server processes"
62 /usr/afs/bin/bosserver
63 OPTIONS="$OPTIONS -nosettime"
68 # Check that all of the client configuration files exist
71 for file in $AFSD $VICEETC/cacheinfo \
72 $VICEETC/ThisCell $VICEETC/CellServDB
74 if [ ! -f ${file} ]; then
75 echo "${file} does not exist. Not starting AFS client."
81 # Check that the root directory for AFS (/afs)
82 # and the cache directory (/usr/vice/cache) both exist
85 for dir in `awk -F: '{print $1, $2}' $VICEETC/cacheinfo`
87 if [ ! -d ${dir} ]; then
88 echo "${dir} does not exist. Not starting AFS client."
97 # Run package to update the disk
99 if [ -f /usr/afsws/etc/package -a -f $PACKAGE ]; then
100 /usr/afsws/etc/package -v -o `cat $PACKAGE` > /dev/console 2>&1
103 (echo "Package completed successfully") > /dev/console 2>&1
104 date > /dev/console 2>&1
107 (echo "Rebooting to restart system") > /dev/console 2>&1
112 (echo "Package update failed; continuing") > /dev/console 2>&1
119 # Start AFS inetd services
120 # (See the AFS Command Ref. for notes on the proper configuration of inetd.afs)
122 if [ -f /usr/sbin/inetd.afs -a -f /etc/inetd.conf.afs ]; then
123 /usr/sbin/inetd.afs /etc/inetd.conf.afs