aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc/rc.d/opensm
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rc/rc.d/opensm')
-rwxr-xr-xlibexec/rc/rc.d/opensm29
1 files changed, 29 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/opensm b/libexec/rc/rc.d/opensm
new file mode 100755
index 000000000000..650345d81c12
--- /dev/null
+++ b/libexec/rc/rc.d/opensm
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+#
+
+# PROVIDE: opensm
+# BEFORE: netif
+# REQUIRE: FILESYSTEMS
+
+. /etc/rc.subr
+
+name="opensm"
+start_cmd="opensm_start"
+rcvar="opensm_enable"
+
+: ${opensm_svcj_options:="net_basic"}
+
+command=/usr/bin/opensm
+command_args="-B"
+
+opensm_start()
+{
+ for guid in `ibstat | grep "Port GUID" | cut -d ':' -f2`; do
+ [ -z "${rc_quiet}" ] && echo "Starting ${guid} opensm."
+ ${command} ${command_args} -g ${guid} >> /dev/null
+ done
+}
+
+load_rc_config $name
+run_rc_command $*