#!/sbin/sh
#	@(#)mountfs.sh	13.3 (RC International) 91/10/07
# mount a filesystem, called from Form.mount

VOL=$1
FSYS=$2
RW=$3

/bin/rm /tmp/mountfs 2>/dev/null

if [ "$RW" = "read-only" ]
then
	RW="-r"
else
	RW=""
fi
/etc/mount $RW $VOL $FSYS >/dev/null 2> /tmp/mnterr$$
if [ $? -eq 0 ]
then
	echo "The file system was mounted successfully." >> /tmp/mountfs
else
	echo "The file system could not be mounted:\n" >> /tmp/mountfs
	cat /tmp/mnterr$$ >>/tmp/mountfs
	/bin/rm /tmp/mnterr$$ 2>/dev/null
fi
