xref: /freebsd/libexec/rc/rc.d/opensm (revision aa1207ea4f030c50a91bca6a3df950ca25113d5a)
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
15command=/usr/bin/opensm
16command_args="-B"
17
18opensm_start()
19{
20	for guid in `ibstat | grep "Port GUID" | cut -d ':' -f2`; do
21		[ -z "${rc_quiet}" ] && echo "Starting ${guid} opensm."
22		${command} ${command_args} -g ${guid} >> /dev/null
23	done
24}
25
26load_rc_config $name
27run_rc_command $*
28