From patchwork Sun Nov 11 19:05:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garrett Cooper X-Patchwork-Id: 1726071 X-Patchwork-Delegate: ira.weiny@intel.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9CC26DF288 for ; Sun, 11 Nov 2012 19:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471Ab2KKTFg (ORCPT ); Sun, 11 Nov 2012 14:05:36 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:64649 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047Ab2KKTFg (ORCPT ); Sun, 11 Nov 2012 14:05:36 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so3805960pad.19 for ; Sun, 11 Nov 2012 11:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:user-agent:mime-version :content-type; bh=eVYdtIaOmCtn2whYilSbEzaf2pEPyZUI/mWKRYcu0GY=; b=QYYeR0l2UVUc0OiWA5faMxMevhk0YAfFNjG5X62RdYZgTU+TxCXY3gViG/T5GV75dB X6lrlgiwan3leEPSyGGqd52lw/FA0HTxJA1+r/yrVZC4fhaxFR0Zmg12KWuxRLPlNG53 j56JNLc5z2sheknJ3vS7hPaJtGXbtYreeVx1LLfS31wlMalxNKXtI8C+pKKbrHm+aDBz xxy/tslPTJMIll9gRz07HIQ4w2lG1FB5EtHu+33El81Ys1qGRyKfMZtC8lqPZanFKsfZ mrVm8DKJoUdJL6HSmvM8ICIRbYW/UPE7Iy/sLbCbgtrpLi5RRL593sdZW9YrGC3MvxLH gMUw== Received: by 10.66.73.102 with SMTP id k6mr48659123pav.22.1352660735563; Sun, 11 Nov 2012 11:05:35 -0800 (PST) Received: from c-24-19-191-56.hsd1.wa.comcast.net (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id bv6sm2948798pab.13.2012.11.11.11.05.34 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Nov 2012 11:05:35 -0800 (PST) Date: Sun, 11 Nov 2012 11:05:32 -0800 (PST) From: Garrett Cooper To: linux-rdma@vger.kernel.org Subject: [PATCH] Remove bashisms from infiniband-diags Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Garrett Cooper From fa869ceb2854ad24ced0b079c023d0c1927a28ef Mon Sep 17 00:00:00 2001 From: Garrett Cooper Date: Mon, 5 Nov 2012 19:02:40 -0800 Subject: [PATCH] Remove bashisms from infiniband-diags Signed-off-by: Garrett Cooper --- doc/generate | 2 +- perltidy.sh | 2 +- scripts/dump_lfts.sh | 2 +- scripts/dump_mfts.sh | 2 +- scripts/ibcheckerrors.in | 6 +++--- scripts/ibcheckerrs.in | 12 ++++++------ scripts/ibchecknet.in | 6 +++--- scripts/ibchecknode.in | 8 ++++---- scripts/ibcheckport.in | 8 ++++---- scripts/ibcheckportstate.in | 8 ++++---- scripts/ibcheckportwidth.in | 8 ++++---- scripts/ibcheckstate.in | 6 +++--- scripts/ibcheckwidth.in | 6 +++--- scripts/ibclearcounters.in | 6 +++--- scripts/ibclearerrors.in | 6 +++--- scripts/ibdatacounters.in | 6 +++--- scripts/ibdatacounts.in | 8 ++++---- scripts/ibhosts.in | 4 ++-- scripts/ibnodes.in | 2 +- scripts/ibrouters.in | 4 ++-- scripts/ibstatus | 2 +- scripts/ibswitches.in | 4 ++-- scripts/set_nodedesc.sh | 2 +- 23 files changed, 60 insertions(+), 60 deletions(-) -- 1.7.11.5 diff --git a/doc/generate b/doc/generate index 3152e1d..68a4cbd 100755 --- a/doc/generate +++ b/doc/generate @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh docdir=`dirname $0` mode=$1 diff --git a/perltidy.sh b/perltidy.sh index 512abdd..16cf552 100755 --- a/perltidy.sh +++ b/perltidy.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (c) 2009 Voltaire, Inc. All rights reserved. # Copyright (c) 2006 The Regents of the University of California. diff --git a/scripts/dump_lfts.sh b/scripts/dump_lfts.sh index 0bf334d..a07c211 100755 --- a/scripts/dump_lfts.sh +++ b/scripts/dump_lfts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # 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 diff --git a/scripts/dump_mfts.sh b/scripts/dump_mfts.sh index d6c2359..cdadba2 100755 --- a/scripts/dump_mfts.sh +++ b/scripts/dump_mfts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # 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 diff --git a/scripts/ibcheckerrors.in b/scripts/ibcheckerrors.in index ca40a68..6ebbe7f 100644 --- a/scripts/ibcheckerrors.in +++ b/scripts/ibcheckerrors.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-b] [-v] [-N | -nocolor]"\ "[ | -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibcheckerrs.in b/scripts/ibcheckerrs.in index 4b34efc..1edd1eb 100644 --- a/scripts/ibcheckerrs.in +++ b/scripts/ibcheckerrs.in @@ -1,15 +1,15 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-b] [-v] [-G] [-T ]" \ "[-s(how_thresholds)] [-N \| -nocolor] [-C ca_name] [-P ca_port]" \ "[-t(imeout) timeout_ms] []" exit -1 } -function green() { +green() { if [ "$bw" = "yes" ]; then if [ "$verbose" = "yes" ]; then echo $1 @@ -21,7 +21,7 @@ function green() { fi } -function red() { +red() { if [ "$bw" = "yes" ]; then echo $1 return @@ -29,7 +29,7 @@ function red() { echo -e "\\033[1;031m" $1 "\\033[0;39m" } -function show_thresholds() { +show_thresholds() { echo "SymbolErrorCounter=$SymbolErrorCounter" echo "LinkErrorRecoveryCounter=$LinkErrorRecoveryCounter" echo "LinkDownedCounter=$LinkDownedCounter" @@ -44,7 +44,7 @@ function show_thresholds() { echo "VL15Dropped=$VL15Dropped" } -function get_thresholds() { +get_thresholds() { . $1 } diff --git a/scripts/ibchecknet.in b/scripts/ibchecknet.in index 75bc45a..3fd4ae7 100644 --- a/scripts/ibchecknet.in +++ b/scripts/ibchecknet.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor]" \ "[ | -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibchecknode.in b/scripts/ibchecknode.in index eac8069..d70d5c8 100644 --- a/scripts/ibchecknode.in +++ b/scripts/ibchecknode.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \ "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] " exit -1 } -function green() { +green() { if [ "$bw" = "yes" ]; then if [ "$verbose" = "yes" ]; then echo $1 @@ -20,7 +20,7 @@ function green() { fi } -function red() { +red() { if [ "$bw" = "yes" ]; then echo $1 return diff --git a/scripts/ibcheckport.in b/scripts/ibcheckport.in index 3c8588e..16a8c24 100644 --- a/scripts/ibcheckport.in +++ b/scripts/ibcheckport.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \ "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] " exit -1 } -function green() { +green() { if [ "$bw" = "yes" ]; then if [ "$verbose" = "yes" ]; then echo $1 @@ -20,7 +20,7 @@ function green() { fi } -function red() { +red() { if [ "$bw" = "yes" ]; then echo $1 return diff --git a/scripts/ibcheckportstate.in b/scripts/ibcheckportstate.in index eb5e304..c5fb948 100644 --- a/scripts/ibcheckportstate.in +++ b/scripts/ibcheckportstate.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \ "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] " exit -1 } -function green() { +green() { if [ "$bw" = "yes" ]; then if [ "$verbose" = "yes" ]; then echo $1 @@ -20,7 +20,7 @@ function green() { fi } -function red() { +red() { if [ "$bw" = "yes" ]; then echo $1 return diff --git a/scripts/ibcheckportwidth.in b/scripts/ibcheckportwidth.in index 0df7a11..9cfca11 100644 --- a/scripts/ibcheckportwidth.in +++ b/scripts/ibcheckportwidth.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor] [-G]" \ "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] " exit -1 } -function green() { +green() { if [ "$bw" = "yes" ]; then if [ "$verbose" = "yes" ]; then echo $1 @@ -20,7 +20,7 @@ function green() { fi } -function red() { +red() { if [ "$bw" = "yes" ]; then echo $1 return diff --git a/scripts/ibcheckstate.in b/scripts/ibcheckstate.in index 8f85f7b..ce89df5 100644 --- a/scripts/ibcheckstate.in +++ b/scripts/ibcheckstate.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor]" \ "[ | -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibcheckwidth.in b/scripts/ibcheckwidth.in index bf917fb..c8a08ee 100644 --- a/scripts/ibcheckwidth.in +++ b/scripts/ibcheckwidth.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-v] [-N | -nocolor]" \ "[ \| -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibclearcounters.in b/scripts/ibclearcounters.in index 318fa84..789e02e 100644 --- a/scripts/ibclearcounters.in +++ b/scripts/ibclearcounters.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [" \ "| -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibclearerrors.in b/scripts/ibclearerrors.in index 4329ae6..ff7a452 100644 --- a/scripts/ibclearerrors.in +++ b/scripts/ibclearerrors.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-N | -nocolor] [" \ "| -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibdatacounters.in b/scripts/ibdatacounters.in index d7bf185..6f0389e 100644 --- a/scripts/ibdatacounters.in +++ b/scripts/ibdatacounters.in @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-b] [-v] [-N | -nocolor]" \ "[ \| -C ca_name -P ca_port -t(imeout) timeout_ms]" exit -1 } -function user_abort() { +user_abort() { echo "Aborted" exit 1 } diff --git a/scripts/ibdatacounts.in b/scripts/ibdatacounts.in index ed5f85d..ac5f8c4 100644 --- a/scripts/ibdatacounts.in +++ b/scripts/ibdatacounts.in @@ -1,15 +1,15 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [-b] [-v] [-G] [-N | -nocolor]" \ "[-C ca_name] [-P ca_port] [-t(imeout) timeout_ms] " \ "[]" exit -1 } -function green() { +green() { if [ "$bw" = "yes" ]; then if [ "$verbose" = "yes" ]; then echo $1 @@ -21,7 +21,7 @@ function green() { fi } -function red() { +red() { if [ "$bw" = "yes" ]; then echo $1 return diff --git a/scripts/ibhosts.in b/scripts/ibhosts.in index 20abdf3..fda0541 100644 --- a/scripts/ibhosts.in +++ b/scripts/ibhosts.in @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [ | -C ca_name" \ "-P ca_port -t timeout_ms]" exit -1 diff --git a/scripts/ibnodes.in b/scripts/ibnodes.in index 0726efc..5871da8 100644 --- a/scripts/ibnodes.in +++ b/scripts/ibnodes.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} diff --git a/scripts/ibrouters.in b/scripts/ibrouters.in index 71f4c60..ae66ca4 100644 --- a/scripts/ibrouters.in +++ b/scripts/ibrouters.in @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [ | -C ca_name" \ "-P ca_port -t timeout_ms]" exit -1 diff --git a/scripts/ibstatus b/scripts/ibstatus index 6f01be0..f7fbbc2 100755 --- a/scripts/ibstatus +++ b/scripts/ibstatus @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Usage ibstatus [devname[:port]] diff --git a/scripts/ibswitches.in b/scripts/ibswitches.in index 2a1bcae..0f3aa91 100644 --- a/scripts/ibswitches.in +++ b/scripts/ibswitches.in @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh IBPATH=${IBPATH:-@IBSCRIPTPATH@} -function usage() { +usage() { echo Usage: `basename $0` "[-h] [ | -C ca_name" \ "-P ca_port -t timeout_ms]" exit -1 diff --git a/scripts/set_nodedesc.sh b/scripts/set_nodedesc.sh index 1f08a54..1e42ac8 100755 --- a/scripts/set_nodedesc.sh +++ b/scripts/set_nodedesc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh if [ -f /etc/sysconfig/network ]; then . /etc/sysconfig/network