#!/bin/sh
#
# $Id: isi_sasphymon_d 169088 2010-12-14 18:49:55Z ndire $
#
# This script is simply a wrapper around the isi_sasphymon_ctl script
# to allow it to fit in with the normal /etc/rc.d startup mechanism. It's 
# job is to start the isi_sasphymon daemon on any systems that support
# Vitesse/Maxim SAS expanders.
#
# PROVIDE: isi_sasphymon_d
# REQUIRE: isi_testsasphy

. /etc/rc.subr

name="isi_sasphymon_d"
start_cmd="isi_sasphymon_d_start"

/usr/bin/isi_hwtools/isi_hal_predicate hasSasPhyMonitoring > /dev/null 2>&1
has_sas_phy_monitoring=$?

isi_sasphymon_d_start()
{
	if [ ${has_sas_phy_monitoring} -eq 1 ]; then
		/usr/bin/isi_hwtools/isi_sasphymon_ctl start
	fi
}

load_rc_config $name
run_rc_command "$1"
