Skip to contentSkip to conversation

The shell scripts use bashism, so use bash directly.

PATCH/infiniband-diags Applied Jason Gunthorpe 3 participants 4 messages Feb 14, 2011 – Feb 17, 2011 3 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

Otherwise it blows up on distributions that don't use bash as /bin/sh, like Debian and Ubuntu. One could probably just remove the bashisms, but that is much harder.

An example error is:
ibswitches: 5: Syntax error: "(" unexpected

---
 scripts/dump_lfts.sh        |    2 +-
 scripts/dump_mfts.sh        |    2 +-
 scripts/ibcheckerrors.in    |    2 +-
 scripts/ibcheckerrs.in      |    2 +-
 scripts/ibchecknet.in       |    2 +-
 scripts/ibchecknode.in      |    2 +-
 scripts/ibcheckport.in      |    2 +-
 scripts/ibcheckportstate.in |    2 +-
 scripts/ibcheckportwidth.in |    2 +-
 scripts/ibcheckstate.in     |    2 +-
 scripts/ibcheckwidth.in     |    2 +-
 scripts/ibclearcounters.in  |    2 +-
 scripts/ibclearerrors.in    |    2 +-
 scripts/ibdatacounters.in   |    2 +-
 scripts/ibdatacounts.in     |    2 +-
 scripts/ibhosts.in          |    2 +-
 scripts/ibnodes.in          |    2 +-
 scripts/ibrouters.in        |    2 +-
 scripts/ibstatus            |    2 +-
 scripts/ibswitches.in       |    2 +-
 scripts/set_nodedesc.sh     |    2 +-
 21 files changed, 21 insertions(+), 21 deletions(-)
scripts/dump_lfts.sh +1 -1
index a07c211..0bf334d 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # This simple script will collect outputs of ibroute for all switches
 # on the subnet and drop it on stdout. It can be used for LFTs dump
scripts/dump_mfts.sh +1 -1
index cdadba2..d6c2359 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # This simple script will collect outputs of ibroute for all switches
 # on the subnet and drop it on stdout. It can be used for MFTs dump
scripts/ibcheckerrors.in +1 -1
index a45bd63..fef503c 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckerrs.in +1 -1
index 6052ff8..4db0929 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibchecknet.in +1 -1
index 6447835..a6d5b1a 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibchecknode.in +1 -1
index 5eea7b5..d105430 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckport.in +1 -1
index fa5e81e..a786e9f 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckportstate.in +1 -1
index dc4fb14..549d427 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckportwidth.in +1 -1
index 60a0892..3b387be 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckstate.in +1 -1
index 63551d5..78359d8 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckwidth.in +1 -1
index cbb154c..49e8d1d 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibclearcounters.in +1 -1
index 86a5528..429018a 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibclearerrors.in +1 -1
index 3dfb96b..f7f1ccc 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibdatacounters.in +1 -1
index 5967406..1abaaf2 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibdatacounts.in +1 -1
index 3dbc56a..a9e94c0 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibhosts.in +1 -1
index baba105..08b2f83 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibnodes.in +1 -1
index 5871da8..0726efc 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibrouters.in +1 -1
index 6404aca..97769db 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibstatus +1 -1
index f7fbbc2..6f01be0 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Usage ibstatus [devname[:port]]
 
scripts/ibswitches.in +1 -1
index 163620a..fff4468 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/set_nodedesc.sh +1 -1
index 855ced7..4ec0c43 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 if [ -f /etc/sysconfig/network ]; then
 . /etc/sysconfig/network
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20110214183613.GA21158-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

Applied
#2 lore raw

Thanks applied,
Ira

Quoted 245 lines · On Mon, 14 Feb 2011 10:36:13 -0800 Jason Gunthorpe…

Otherwise it blows up on distributions that don't use bash as /bin/sh, like Debian and Ubuntu. One could probably just remove the bashisms, but that is much harder.

An example error is:
ibswitches: 5: Syntax error: "(" unexpected

---
 scripts/dump_lfts.sh        |    2 +-
 scripts/dump_mfts.sh        |    2 +-
 scripts/ibcheckerrors.in    |    2 +-
 scripts/ibcheckerrs.in      |    2 +-
 scripts/ibchecknet.in       |    2 +-
 scripts/ibchecknode.in      |    2 +-
 scripts/ibcheckport.in      |    2 +-
 scripts/ibcheckportstate.in |    2 +-
 scripts/ibcheckportwidth.in |    2 +-
 scripts/ibcheckstate.in     |    2 +-
 scripts/ibcheckwidth.in     |    2 +-
 scripts/ibclearcounters.in  |    2 +-
 scripts/ibclearerrors.in    |    2 +-
 scripts/ibdatacounters.in   |    2 +-
 scripts/ibdatacounts.in     |    2 +-
 scripts/ibhosts.in          |    2 +-
 scripts/ibnodes.in          |    2 +-
 scripts/ibrouters.in        |    2 +-
 scripts/ibstatus            |    2 +-
 scripts/ibswitches.in       |    2 +-
 scripts/set_nodedesc.sh     |    2 +-
 21 files changed, 21 insertions(+), 21 deletions(-)
scripts/dump_lfts.sh +1 -1
index a07c211..0bf334d 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # This simple script will collect outputs of ibroute for all switches
 # on the subnet and drop it on stdout. It can be used for LFTs dump
scripts/dump_mfts.sh +1 -1
index cdadba2..d6c2359 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # This simple script will collect outputs of ibroute for all switches
 # on the subnet and drop it on stdout. It can be used for MFTs dump
scripts/ibcheckerrors.in +1 -1
index a45bd63..fef503c 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckerrs.in +1 -1
index 6052ff8..4db0929 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibchecknet.in +1 -1
index 6447835..a6d5b1a 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibchecknode.in +1 -1
index 5eea7b5..d105430 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckport.in +1 -1
index fa5e81e..a786e9f 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckportstate.in +1 -1
index dc4fb14..549d427 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckportwidth.in +1 -1
index 60a0892..3b387be 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckstate.in +1 -1
index 63551d5..78359d8 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibcheckwidth.in +1 -1
index cbb154c..49e8d1d 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibclearcounters.in +1 -1
index 86a5528..429018a 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibclearerrors.in +1 -1
index 3dfb96b..f7f1ccc 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibdatacounters.in +1 -1
index 5967406..1abaaf2 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibdatacounts.in +1 -1
index 3dbc56a..a9e94c0 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibhosts.in +1 -1
index baba105..08b2f83 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibnodes.in +1 -1
index 5871da8..0726efc 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibrouters.in +1 -1
index 6404aca..97769db 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/ibstatus +1 -1
index f7fbbc2..6f01be0 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Usage ibstatus [devname[:port]]
 
scripts/ibswitches.in +1 -1
index 163620a..fff4468 100644
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 IBPATH=${IBPATH:-@IBSCRIPTPATH@}
 
scripts/set_nodedesc.sh +1 -1
index 855ced7..4ec0c43 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 if [ -f /etc/sysconfig/network ]; then
 . /etc/sysconfig/network
Signature · 1 line
1.7.1
Signature · 9 lines
Ira Weiny
Math Programmer/Computer Scientist
Lawrence Livermore National Lab
925-423-8008
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Git repo for ibutils?

Ira,

What's the correct git repo for ibutils? The most recently updated version appears to be:

http://git.openfabrics.org/git?p=~kliteyn/ibutils.git;a=summary

I submitted a report that a patch needs to be rolled back to Yevgeny but he never replied and you seem to be the last person to commit to that tree.

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4C2744E8AD2982428C5BFE523DF8CDCB4A20B28888-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org

#6 lore raw

Re: Git repo for ibutils?

Mike,

Yevgeny is the maintainer and that is the master branch, so submitting patches to him is the correct person.

Did you submit your patch on linux-rdma as well? I am sure he just missed the patch.

Ira

Quoted 16 lines · On Thu, 17 Feb 2011 08:47:05 -0800 Mike Heinz…

Ira,

What's the correct git repo for ibutils? The most recently updated version appears to be:

http://git.openfabrics.org/git?p=~kliteyn/ibutils.git;a=summary

I submitted a report that a patch needs to be rolled back to Yevgeny but he never replied and you seem to be the last person to commit to that tree.

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 9 lines
Ira Weiny
Math Programmer/Computer Scientist
Lawrence Livermore National Lab
925-423-8008
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html