Fwd: Re: arla daemon
Michael Hanke
hanke at nada.kth.se
Fri Apr 28 16:37:11 CEST 2000
On Fre, 28 Apr 2000 you wrote:
> Pal Hidas <hidas at rmki.kfki.hu> writes:
>
> > Thanks for the answers, I have SuSe Linux, and I attached the list of
> > files in the /etc directory. If you could tell me which file to put in
> > the appropriate line ( /usr/arla/bin/startarla ? ) that would be useful
> > for me ;-)
>
> You should probably read /etc/rc.d.README. If you are in luck there is
> /etc/rc.d/rc.local that you can add /usr/arla/bin/startarla too.
>
> If there are any SuSE people out there they can probably answer your
> question better.
>
> Love
--
OK. Here is what I have running. I have a SuSE Linux 6.3 system. In the
directory /sbin/init.d, I have the following script (executable by root):
/sbin/init.d/arla:
#!/bin/sh
#
# $Id: arla.init.in,v 1.3 1999/08/14 02:54:34 lha Exp $
#
# A simple SYSV startup script to start/stop arla for Linux
#
# You must have a path that includes, insmod, mknod,
# chmod, mount, mkdir and arlad.
#
# Modified for inclusion in the suse sysinit
.. /etc/rc.config
ARLABINDIR=/usr/arla/bin
CACHEDIR=/usr/arla/cache
PATH=$PATH:$ARLABINDIR
export PATH
if [ ! -f $ARLABINDIR/xfs.o -o ! -x $ARLABINDIR/arlad ]; then
exit 1
fi
return=$rc_done
case "$1" in
start)
echo -n "Starting service arla"
insmod $ARLABINDIR/xfs.o || return=$rc_failed
sleep 1
if [ ! -c /dev/xfs0 ] ; then
rm -f /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
startproc $ARLABINDIR/arlad -z || return=$rc_failed
if [ ! -d /afs ] ; then
mkdir /afs
fi
sleep 3
echo -e "$return"
return=$rc_done
echo -n "Mounting AFS filesystem..."
mount -t xfs arla /afs || return=$rc_failed
echo -e "$return"
;;
stop)
echo -n "Unmounting AFS filesystem... "
umount /afs || return=$rc_failed
echo -e "$return"
return=$rc_done
echo -n "Stopping service arla... "
killproc -TERM $ARLABINDIR/arlad || return=$rc_failed
sleep 1
rmmod xfs || return=$rc_failed
echo -e "$return"
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
status)
echo -n "Checking for service arla..."
checkproc $ARLABINDIR/arlad && echo OK || echo No process
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
test "$return" = "$rc_done" || exit 1
exit 0
Note that the above is not configurable via SuSE's rc.config and/or Yast. I was
a little bit lazy.
Finally, the following symbolic links should be set in /sbin/init.d/rc2.d and
/sbin/init.d/rc3.d:
ln -s ../arla K36arla
ln -s ../arla S09arla
This should be all.
Greetings,
Michael
+---------------------------------------------------------------+
| Michael Hanke Royal Institute of Technology |
| NADA |
| S-10044 Stockholm |
| Sweden |
+---------------------------------------------------------------+
| Visiting address: Lindstedtsvaegen 3 |
| Phone: + (46) (8) 790 6278 |
| Fax: + (46) (8) 790 0930 |
| Email: hanke at nada.kth.se |
| na.mhanke at na-net.ornl.gov |
+---------------------------------------------------------------+
-------------------------------------------------------
--
+---------------------------------------------------------------+
| Michael Hanke Royal Institute of Technology |
| NADA |
| S-10044 Stockholm |
| Sweden |
+---------------------------------------------------------------+
| Visiting address: Lindstedtsvaegen 3 |
| Phone: + (46) (8) 790 6278 |
| Fax: + (46) (8) 790 0930 |
| Email: hanke at nada.kth.se |
| na.mhanke at na-net.ornl.gov |
+---------------------------------------------------------------+
-------------------------------------------------------
--
+---------------------------------------------------------------+
| Michael Hanke Royal Institute of Technology |
| NADA |
| S-10044 Stockholm |
| Sweden |
+---------------------------------------------------------------+
| Visiting address: Lindstedtsvaegen 3 |
| Phone: + (46) (8) 790 6278 |
| Fax: + (46) (8) 790 0930 |
| Email: hanke at nada.kth.se |
| na.mhanke at na-net.ornl.gov |
+---------------------------------------------------------------+
More information about the Arla-drinkers
mailing list