: use /bin/sh

cd /usr/lib/fnet

# This might be unnecessary.
PATH=$PATH:.

LOCKDIR=`rfconfig lockdir`

# This may fail but is better than nothing
# Reboot should clear the locks?

if [ -r ${LOCKDIR}/LCK..fidonet ]
then
	echo "Already going"
	exit 0
fi
echo $$ > ${LOCKDIR}/LCK..fidonet

echo Doing a fidonet call
cd `rfconfig libdir`
DIALDEBUG=a
export DIALDEBUG
fpack >> loki 2>&1
fcall $* >> loki 2>&1
funpack	>> loki 2>&1

rm ${LOCKDIR}/LCK..fidonet

