#!/bin/sh
#SYSTEMS: Solaris
MSG="# Checking for the DMI (Desktop Management Interface) services..."
SYSTEM=`uname -s`
######Solaris######
if [ "$SYSTEM" = "SunOS" ]; then
  echo ""; echo "$MSG"
  case "`uname -r`" in
  5.[6789]*) ;;
  *)
    #Only supported on Solaris 2.6 and newer
    exit 0;;
  esac
  #
  #Check for snmpdXdmid and dmispd daemons...
  PSSNMP=`ps -ef | grep /snmpXdmid | grep -v grep`
  PSDMI=`ps -ef | grep /dmispd | grep -v grep`
  if [ "$PSSNMP" != "" -o "$PSDMI" != "" ]; then  #A daemon found running...
    echo "--FAIL-- [DMI001f] A DMI server daemon found running on this system."
  elif [ -s /etc/rc3.d/S77dmi ]; then  #DMI startup script found...
    echo "--WARN-- [DMI002w] SNMP server script FOUND in /etc/rc3.d directory."
  fi
fi
