[1042] in arla-drinkers

home help back first fref pref prev next nref lref last post

Redhat init script

daemon@ATHENA.MIT.EDU (John Wells)
Tue Aug 3 07:53:45 1999

From owner-arla-drinkers@stacken.kth.se Tue Aug 03 11:53:45 1999
Return-Path: <owner-arla-drinkers@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 1424 invoked from network); 3 Aug 1999 11:53:44 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
  by bloom-picayune.mit.edu with SMTP; 3 Aug 1999 11:53:44 -0000
Received: (from majordom@localhost)
	by sundance.stacken.kth.se (8.8.8/8.8.8) id NAA04205
	for arla-drinkers-list; Tue, 3 Aug 1999 13:43:35 +0200 (MET DST)
Received: from squid.pdc.kth.se (squid.pdc.kth.se [130.237.221.65])
	by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id NAA04194
	for <arla-drinkers@stacken.kth.se>; Tue, 3 Aug 1999 13:43:29 +0200 (MET DST)
Received: (from d95-mah@localhost)
	by squid.pdc.kth.se (8.8.7/8.8.7) id NAA22497;
	Tue, 3 Aug 1999 13:43:24 +0200 (MET DST)
Message-Id: <199908030253.WAA21956@sable.cc.vt.edu>
X-Sender: jowells@mail.vt.edu
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.2 
Date: Mon, 02 Aug 1999 22:52:57 -0400
To: arla-drinkers@stacken.kth.se
From: John Wells <jowells@mail.vt.edu>
Subject: Redhat init script
Mime-Version: 1.0
Content-Type: multipart/mixed;
	boundary="=====================_93697120==_"
Lines: 105
Sender: owner-arla-drinkers@stacken.kth.se
Precedence: bulk

--=====================_93697120==_
Content-Type: text/plain; charset="us-ascii"

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) 
--=====================_93697120==_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="afs"

#! /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} =3D "no" ]
then
	exit 0
fi

# Export Arla environment=
 variables
PATH=3D"/sbin:/usr/sbin:/usr/bin:/bin:/usr/arla/bin"
BINDIR=3D/usr/arla/bin
CACHEDIR=3D/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


--=====================_93697120==_--



home help back first fref pref prev next nref lref last post