Redhat init script
John Wells
jowells at mail.vt.edu
Tue Aug 3 13:43:35 CEST 1999
Here's an init script for Redhat 6.0 (probably previous versions as well) I
hacked from startarla. Works pretty well for me...
enjoy
john
---
John Wells . The MITRE Corporation
CapAccess Freenet Staff . FAA Weather Group (F081)
#! /bin/sh
#
# chkconfig: 345 60 20
# description: Arla is an implementation of an AFS client. AFS (The \
# Andrew File System) is a distributed file system readily \
# scalable, fast, and secure.
# processname: arlad
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up
if [ ${NETWORKING} = "no" ]
then
exit 0
fi
# Export Arla environment variables
PATH="/sbin:/usr/sbin:/usr/bin:/bin:/usr/arla/bin"
BINDIR=/usr/arla/bin
CACHEDIR=/usr/arla/cache
case "$1" in
start)
echo -n "Starting afs services: "
# Load afs file system module
insmod $BINDIR/xfs.o
sleep 1
if [ ! -c /dev/xfs0 ] ; then
echo Creating device /dev/xfs0
mknod /dev/xfs0 c 103 0
chmod 600 /dev/xfs0
fi
if [ ! -e $CACHEDIR ] ; then
mkdir $CACHEDIR
chmod 700 $CACHEDIR
chown root $CACHEDIR
fi
# Run arla afs client daemon
daemon "$BINDIR/arlad -z" $silent $export
if [ ! -d /afs ] ; then
mkdir /afs
fi
# Mount AFS file system on /afs
sleep 3
mount -t xfs arla /afs
echo
touch /var/lock/subsys/afs
;;
stop)
echo -n "Stopping afs services: "
umount /afs
killproc arlad
rmmod xfs
echo
rm -f /var/lock/subsys/routed
;;
status)
status routed
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage afs {start|stop|status|restart|reload}"
exit 1
esac
exit 0
More information about the Arla-drinkers
mailing list