#!/bin/sh
#
# Check if the NFS subsystem is operational

PROFILE=
if test -r /etc/debian-edu/config ; then
    . /etc/debian-edu/config
fi

success() { echo "success: $0: $*" ; }
error() { echo "error: $0: $*" ; }

# Only Main-Server and Thin-Client-Server should export file systems
# via NFS.

enabled=false
if echo "$PROFILE" | grep -q Main-Server ; then
    enabled=true
fi
if echo "$PROFILE" | grep -q Thin-Client-Server ; then
    enabled=true
fi


if $enabled ; then
    if showmount -e ; then
	success "showmount -e return success."
    else
	error "showmount -e return error."
    fi
fi
