#!/bin/sh
# @(#)mount-afp.sh	1.3 revision of 90/12/20  12:58:44
# This is an unpublished work copyright (c) 1990 Helios Software GmbH
# 3000 Hannover 1, West Germany

# args $1 directory path, $2 Macintosh volumeName
# $3 mount of umount command string, $4 read only flag

case $3 in
mount)
	if test x"$4" = x-r
	then
		rwflag="-o ro"
	else
		rwflag="-o rw"
	fi
	err=`/etc/mount $rwflag $1 2>&1`
	;;
umount)
	err=`/etc/umount $1 2>&1`
	;;
esac

if test -n "$err"
then
	echo "admsrv: $3 on afpvolume \"$2\" failed: $err" >/dev/console
	exit 1
else
	exit 0
fi
