[ofa-general] [PATCH 2/2] infiniband-diags/set_mthca_nodedesc.sh: change to work for all HCA's

Ira Weiny weiny2 at llnl.gov
Thu Aug 9 19:03:32 PDT 2007


>From 3c78f9f7797a9029b33a1a80476f82929f8a7ad7 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Thu, 9 Aug 2007 18:51:09 -0700
Subject: [PATCH] Change the name of set_mthca_nodedesc.sh to set_nodedesc.sh because it should

work for all HCA types now.

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 infiniband-diags/ChangeLog                     |    6 ++++++
 infiniband-diags/Makefile.am                   |    2 +-
 infiniband-diags/infiniband-diags.spec.in      |    5 ++++-
 infiniband-diags/scripts/set_mthca_nodedesc.sh |   18 ------------------
 infiniband-diags/scripts/set_nodedesc.sh       |   18 ++++++++++++++++++
 5 files changed, 29 insertions(+), 20 deletions(-)
 delete mode 100755 infiniband-diags/scripts/set_mthca_nodedesc.sh
 create mode 100755 infiniband-diags/scripts/set_nodedesc.sh

diff --git a/infiniband-diags/ChangeLog b/infiniband-diags/ChangeLog
index ad35140..9dae628 100644
--- a/infiniband-diags/ChangeLog
+++ b/infiniband-diags/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-09 Ira Weiny <weiny2 at llnl.gov>
+
+	* scripts/set_mthca_nodedesc.sh: change to set_nodedesc.sh
+	* scripts/set_mthca_nodedesc.sh: attempt to set nodedesc on all HCA's found
+	  in sysfs
+
 2007-07-10 Hal Rosenstock <halr at voltaire.com>
 
 	* 1.3.1 release of infiniband-diags
diff --git a/infiniband-diags/Makefile.am b/infiniband-diags/Makefile.am
index c90fed1..fcaa29e 100644
--- a/infiniband-diags/Makefile.am
+++ b/infiniband-diags/Makefile.am
@@ -26,7 +26,7 @@ sbin_SCRIPTS = scripts/ibcheckerrs scripts/ibchecknet scripts/ibchecknode \
 	       scripts/ibclearcounters scripts/ibdatacounts \
 	       scripts/ibdatacounters scripts/ibdiscover.pl \
 	       scripts/dump_lfts.sh scripts/dump_mfts.sh \
-	       scripts/set_mthca_nodedesc.sh \
+	       scripts/set_nodedesc.sh \
 	       scripts/ibqueryerrors.pl scripts/ibswportwatch.pl \
 	       scripts/iblinkinfo.pl scripts/ibprintswitch.pl \
 	       scripts/ibprintca.pl scripts/ibprintrt.pl \
diff --git a/infiniband-diags/infiniband-diags.spec.in b/infiniband-diags/infiniband-diags.spec.in
index b67a645..335fa8a 100644
--- a/infiniband-diags/infiniband-diags.spec.in
+++ b/infiniband-diags/infiniband-diags.spec.in
@@ -48,7 +48,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_sbindir}/vendstat
 %{_sbindir}/dump_mfts.sh
 %{_sbindir}/dump_lfts.sh
-%{_sbindir}/set_mthca_nodedesc.sh
+%{_sbindir}/set_nodedesc.sh
 %{_sbindir}/sm*
 %define _perldir %(perl -e 'use Config; $T=$Config{installsitearch}; $T=~/(.*)\\/site_perl.*/; print $1;')
 %{_perldir}/*
@@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc README ChangeLog
 
 %changelog
+* Thu Aug 9 2007 Ira Weiny <weiny2 at llnl.gov> - 1.3.1
+- Change set_mthca_nodedesc.sh to set_nodedesc.sh
+
 * Tue Jul 10 2007 Hal Rosenstock <halr at voltaire.com> - 1.3.1
 - Add link width and speed to topology file output in ibnetdiscover
 - Add support for -R(outer_list) in ibnetdiscover
diff --git a/infiniband-diags/scripts/set_mthca_nodedesc.sh b/infiniband-diags/scripts/set_mthca_nodedesc.sh
deleted file mode 100755
index 4613de6..0000000
--- a/infiniband-diags/scripts/set_mthca_nodedesc.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# set the node_desc field of any hca found to the defined hostname
-
-. /etc/sysconfig/network
-
-ib_sysfs="/sys/class/infiniband"
-
-for hca in `ls $ib_sysfs`; do
-   if [ -f $ib_sysfs/$hca/node_desc ]; then
-      echo -n "$HOSTNAME" >> $ib_sysfs/$hca/node_desc
-   else
-      logger -s "Failed to set node_desc for : $hca"
-   fi
-done
-
-exit 0
-
diff --git a/infiniband-diags/scripts/set_nodedesc.sh b/infiniband-diags/scripts/set_nodedesc.sh
new file mode 100755
index 0000000..4613de6
--- /dev/null
+++ b/infiniband-diags/scripts/set_nodedesc.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# set the node_desc field of any hca found to the defined hostname
+
+. /etc/sysconfig/network
+
+ib_sysfs="/sys/class/infiniband"
+
+for hca in `ls $ib_sysfs`; do
+   if [ -f $ib_sysfs/$hca/node_desc ]; then
+      echo -n "$HOSTNAME" >> $ib_sysfs/$hca/node_desc
+   else
+      logger -s "Failed to set node_desc for : $hca"
+   fi
+done
+
+exit 0
+
-- 
1.5.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Change-the-name-of-set_mthca_nodedesc.sh-to-set_node.patch
Type: application/octet-stream
Size: 4088 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070809/b576c32b/attachment.obj>


More information about the general mailing list