#!/bin/sh
#
# $Header: /Secure/secure-doc/linux/CFS/RCS/CFS-Doc,v 1.4 1996/03/15 04:49:37 alex Exp alex $
#
# cfsfs		Crypto filesystem 
#
# Author:	Alexander O. Yuriev <alex@bach.cis.temple.edu>
#		Derived from cron		
#
# Modifed for redhat package by Mike Bremford <Mike.Bremford@bl.uk>

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
	echo -n "Starting Crypto Filesystem: "
	if [ -x /usr/sbin/cfsd ]; then
		/usr/sbin/cfsd > /dev/null
		/bin/mount -o port=3049,intr localhost:/.cfsfs /crypt
		echo "done"
	else 
		echo -n "Crypto Filesystem is not installed"
	fi
	touch /var/lock/subsys/cfsfs
	;;
  stop)
	echo -n "Stopping Crypto filesystem: "
	umount /crypt
	killproc cfsd
	echo
	rm -f /var/lock/subsys/cfsfs
	;;
  *)
	echo "Usage: cfsfs {start|stop}"
	exit 1
esac

exit 0
