#!/bin/sh
#SYSTEMS: Solaris
#This script checks for the Networked File System client service.
MSG="# Checking for the nfs client daemons and startup script"
SYSTEM=`uname -s`
######Solaris######
if [ "$SYSTEM" = "SunOS" ]; then
  echo ""; echo "$MSG"
  CHK=`ls /etc/rc*.d/S*nfs.client 2>/dev/null | tr "[\n]" " "`
  LCK=`ps -ef | grep "nfs/lockd" | grep -v grep`
  STT=`ps -ef | grep "nfs/statd" | grep -v grep`
  #
  if [ "$LCK" != "" -o "$STT" != "" ]; then #Daemons are running...
    echo "--FAIL-- [NFS004f] The NFS lockd and/or statd daemons were found running."
  fi
  #
  if [ "$CHK" != "" ]; then  #Startup script(s) found
    echo "--INFO-- [NFS005w] The following NFS client startup script(s) were found: $CHK"
  fi
fi

