#!/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.5 1999/05/22 18:54:48 mackan Exp $
#


PATH="/sbin:/usr/sbin:/usr/bin:/bin:%bindir%"
BINDIR=%bindir%
CACHEDIR=%ARLACACHEDIR%

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

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