1#!/bin/sh 2# 3# 4 5# PROVIDE: opensm 6# BEFORE: netif 7# REQUIRE: FILESYSTEMS 8 9. /etc/rc.subr 10 11name="opensm" 12start_cmd="opensm_start" 13rcvar="opensm_enable" 14 15: ${opensm_svcj_options:="net_basic"} 16 17command=/usr/bin/opensm 18command_args="-B" 19 20opensm_start() 21{ 22 for guid in `ibstat | grep "Port GUID" | cut -d ':' -f2`; do 23 [ -z "${rc_quiet}" ] && echo "Starting ${guid} opensm." 24 ${command} ${command_args} -g ${guid} >> /dev/null 25 done 26} 27 28load_rc_config $name 29run_rc_command $* 30