Aus HC Services
#! /bin/bash
#
# OpenAFS Bring up/down service
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
#
# Note that AFS does not use a pid file in /var/run. It is turned off by
# unmounting /afs.
AFS_MOD=/opt/openafs/lib/openafs/libafs-$(uname -r).mp.ko
AFSD_OPTIONS="-afsdb"
# load_client loads the AFS client module if it's not already loaded.
case "$1" in
start)
echo "Starting AFS services..... "
# Start bosserver
/opt/openafs/sbin/bosserver
# wait for fileserver to finish salvaging
sleep 1
while /opt/openafs/bin/bos status localhost fs 2>&1 | grep 'Auxiliary.*salvaging'; do
echo "Waiting for salvager to finish..... "
sleep 1
done
# Start AFS client
modprobe sunrpc && insmod -f ${AFS_MOD}
/opt/openafs/sbin/afsd ${AFSD_OPTIONS}
;;
stop)
# Stop AFS
echo "Stopping AFS services..... "
umount /afs
echo "Stopping AFS bosserver"
/opt/openafs/bin/bos shutdown localhost -localauth -wait
killall -HUP bosserver
/sbin/rmmod libafs
;;
restart)
# Restart AFS
$0 stop
$0 start
;;
*)
echo Usage: 'afs <start|stop|restart>'
esac
exit 0
Zurück zu Installation fertigstellen