#!/bin/sh
#
# $Id: isi_testsasphy 420404 2014-07-01 15:28:32Z dryan $
#
# This script is simply a wrapper around the isi_checksasphy 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_testsasphy
# REQUIRE: syslogd isi_configure_dons isi_testjournal isi_hw_init

. /etc/rc.subr

name="isi_testsasphy"
start_cmd="isi_testsasphy_start"
stop_cmd="isi_testsasphy_stop"

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

isi_testsasphy_start()
{
	if [ ${has_sas_phy_monitoring} -eq 1 ]; then
		/usr/bin/isi_hwtools/isi_checksasphy
	fi
}

isi_testsasphy_stop()
{
	echo 'This does nothing.'
}

load_rc_config $name
run_rc_command "$1"
