Date: Sun, 9 Jan 2011 08:54:58 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r217186 - in projects/ofed/head: . etc/defaults etc/rc.d share/mk Message-ID: <201101090854.p098swUk035822@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jeff Date: Sun Jan 9 08:54:57 2011 New Revision: 217186 URL: http://svn.freebsd.org/changeset/base/217186 Log: - Add an rc script for opensm that starts a copy on all ports. - Fix the MK_OFED rc option using the proper mechanism. Sponsored by: Isilon Systems, iX Systems, and Panasas. Added: projects/ofed/head/etc/rc.d/opensm (contents, props changed) Modified: projects/ofed/head/Makefile.inc1 projects/ofed/head/etc/defaults/rc.conf projects/ofed/head/etc/rc.d/Makefile projects/ofed/head/share/mk/bsd.own.mk Modified: projects/ofed/head/Makefile.inc1 ============================================================================== --- projects/ofed/head/Makefile.inc1 Sun Jan 9 08:07:58 2011 (r217185) +++ projects/ofed/head/Makefile.inc1 Sun Jan 9 08:54:57 2011 (r217186) @@ -65,7 +65,7 @@ SUBDIR+=secure SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin -.if !defined(MK_OFED) || ${MK_OFED} != "no" +.if ${MK_OFED} != "no" SUBDIR+=contrib/ofed .endif # @@ -1180,7 +1180,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 _lib_libthr= lib/libthr .endif -.if !defined(MK_OFED) || ${MK_OFED} != "no" +.if ${MK_OFED} != "no" _ofed_lib= contrib/ofed/usr.lib/ .endif Modified: projects/ofed/head/etc/defaults/rc.conf ============================================================================== --- projects/ofed/head/etc/defaults/rc.conf Sun Jan 9 08:07:58 2011 (r217185) +++ projects/ofed/head/etc/defaults/rc.conf Sun Jan 9 08:54:57 2011 (r217186) @@ -647,6 +647,7 @@ bsdextended_script="/etc/rc.bsdextended" newsyslog_enable="YES" # Run newsyslog at startup. newsyslog_flags="-CN" # Newsyslog flags to create marked files mixer_enable="YES" # Run the sound mixer. +opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off ############################################################## ### Jail Configuration ####################################### Modified: projects/ofed/head/etc/rc.d/Makefile ============================================================================== --- projects/ofed/head/etc/rc.d/Makefile Sun Jan 9 08:07:58 2011 (r217185) +++ projects/ofed/head/etc/rc.d/Makefile Sun Jan 9 08:54:57 2011 (r217186) @@ -42,6 +42,10 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI ypset ypupdated ypxfrd \ zfs zvol +.if ${MK_OFED} != "no" +FILES+= opensm +.endif + .if ${MK_OPENSSH} != "no" FILES+= sshd .endif Added: projects/ofed/head/etc/rc.d/opensm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/ofed/head/etc/rc.d/opensm Sun Jan 9 08:54:57 2011 (r217186) @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: opensm +# BEFORE: netif +# REQUIRE: FILESYSTEMS + +. /etc/rc.subr + +name="opensm" +start_cmd="opensm_start" +rcvar="opensm_enable" + +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 $* Modified: projects/ofed/head/share/mk/bsd.own.mk ============================================================================== --- projects/ofed/head/share/mk/bsd.own.mk Sun Jan 9 08:07:58 2011 (r217185) +++ projects/ofed/head/share/mk/bsd.own.mk Sun Jan 9 08:54:57 2011 (r217186) @@ -368,6 +368,7 @@ _clang_no=CLANG NS_CACHING \ NTP \ OBJC \ + OFED \ OPENSSH \ OPENSSL \ PAM \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101090854.p098swUk035822>