#!/bin/bash

# sourcing our current rc.conf requires this to be a bash script
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
	start)
		stat_busy "Mounting Network Filesystems"
		mount -a -t "$NETFS"
		rc=$?
		mount -a -O _netdev
		(( rc || $? )) && stat_die
		add_daemon netfs
		stat_done
		;;
	stop)
		stat_busy "Unmounting Network Filesystems"
		umount -a -O _netdev
		rc=$?
		umount -a -t "$NETFS"
		(( rc || $? )) && stat_die
		rm_daemon netfs
		stat_done
		;;
	restart)
		$0 stop
		sleep 1
		$0 start
		;;
	*)
		echo "usage: $0 {start|stop|restart}"
		exit 1
esac

# vim: set ts=2 noet:
