#! /bin/sh # # ftpfs Manage the ftp file system # # version 1.0 patb@corel.ca DAEMON=/usr/bin/podfuk test -c /dev/cfs0 || { cd /dev; ./MAKEDEV cfs0; } test -x $DAEMON || exit 0 # if you want quiet, add 2&>/dev/null after the next line case "$1" in start) echo -n "Starting FTP filesystem: ftpfs " modprobe coda start-stop-daemon --start --quiet --exec $DAEMON mount /dev/cfs0 /mnt/.mcvfs -tcoda ;; stop) echo -n "Stopping FTP filesystem: ftpfs " umount /mnt/.mcvfs start-stop-daemon --stop --quiet --exec $DAEMON sleep 2 rmmod coda echo "." ;; reload) echo "Not implemented." ;; force-reload|restart) sh $0 stop sh $0 start ;; status) if grep mcvfs /proc/mounts; then echo "FTP fs is running" else echo "FTP fs is not running" fi ;; *) echo "Usage: /etc/init.d/ftpfs {start|stop|restart|force-reload|reload|status}" exit 1 ;; esac exit 0