#!/bin/sh
#
# A simple startupscript to start arla for Linux
# 
# You must have a path that includes, insmod, mknod, 
# chmod, mount, mkdir and arlad.
#
# $Id: startarla.in,v 1.7 2000/10/17 04:36:35 assar Exp $
#


PATH=/sbin:/usr/sbin:/usr/bin:/bin
LIBEXECDIR=/usr/arla/libexec
MODULEDIR=/usr/arla/bin
CACHEDIR=/usr/arla/cache

insmod $MODULEDIR/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

$LIBEXECDIR/arlad -z
if [ ! -d /afs ] ; then
    mkdir /afs
fi
sleep 3
mount -t xfs /dev/xfs0 /afs
