From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jun 4 07:50:05 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E981065687 for ; Wed, 4 Jun 2008 07:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EE6338FC24 for ; Wed, 4 Jun 2008 07:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m547o4M1095133 for ; Wed, 4 Jun 2008 07:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m547o4ej095132; Wed, 4 Jun 2008 07:50:04 GMT (envelope-from gnats) Date: Wed, 4 Jun 2008 07:50:04 GMT Message-Id: <200806040750.m547o4ej095132@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Ruben van Staveren Cc: Subject: Re: ports/123697: [PATCH] sysutils/linux-megacli: Fix periodic script after update X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ruben van Staveren List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2008 07:50:05 -0000 The following reply was made to PR ports/123697; it has been noted by GNATS. From: Ruben van Staveren To: Ulrich Spoerlein Cc: bug-followup@FreeBSD.org Subject: Re: ports/123697: [PATCH] sysutils/linux-megacli: Fix periodic script after update Date: Wed, 4 Jun 2008 09:44:57 +0200 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-9-182580349 Content-Type: multipart/mixed; boundary=Apple-Mail-8-182580230 --Apple-Mail-8-182580230 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi all, On 30 May 2008, at 17:07, Ulrich Spoerlein wrote: > > On Thu, 22.05.2008 at 21:02:11 +0200, Ruben van Staveren wrote: >>> - Take some other random field for the battery ok status >> You have a 'iBBU', I have a 'BBU' > > Another one of our systems prints iTBBU (older version of megacli, > though). Therefore I widened the field to 5 chars. > >> isok is better initialised as "N/A" instead of -1 > > I opted for "-" as that is visually less "fat" than N/A > >>> - Print units with battery output (makes it more clear what the >>> columns >>> mean, IMHO) >> Ok, but CC stands for Cycle Count so that cannot be in mAh > > Thanks, fixed! > >> Can you do a second version of your patch ? > > attached. looks fine now, please commit Thanks! Ruben > > > Cheers, > Ulrich Spoerlein --Apple-Mail-8-182580230 Content-Disposition: attachment; filename=diif.txt Content-Type: text/plain; x-unix-mode=0666; name="diif.txt" Content-Transfer-Encoding: 7bit Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/linux-megacli/Makefile,v retrieving revision 1.6 diff -u -p -r1.6 Makefile --- Makefile 19 Mar 2008 03:23:36 -0000 1.6 +++ Makefile 30 May 2008 07:34:16 -0000 @@ -7,6 +7,7 @@ PORTNAME= megacli PORTVERSION= 1.01.40 +PORTREVISION= 1 CATEGORIES= sysutils linux MASTER_SITES= http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/ PKGNAMEPREFIX= linux- Index: files/407.status-mfi-raid.in =================================================================== RCS file: /home/ncvs/ports/sysutils/linux-megacli/files/407.status-mfi-raid.in,v retrieving revision 1.3 diff -u -p -r1.3 407.status-mfi-raid.in --- files/407.status-mfi-raid.in 17 Apr 2008 20:07:53 -0000 1.3 +++ files/407.status-mfi-raid.in 30 May 2008 07:42:07 -0000 @@ -67,7 +67,7 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX E=-1; S=-1; D=-1; s=-1; mec=-1; oec=-1; pfc=-1; lpfeqn=-1; state=""; } - /^Enclosure Number:/ { E=$3; } + /^Enclosure (Number|Device ID):/ { E=$3; } /^Slot Number:/ { S=$3; } /^Device Id:/ { D=$3; } /^Sequence Number:/ { s=$3; } @@ -127,12 +127,11 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX } } ' - echo - echo "BBU Information:" + # Print BBU Information, if we found something ${megacli} -AdpBbuCmd -a${ctrl} | \ awk ' BEGIN { - type=""; temp=-1; isok=-1; rsoc=-1; asoc=-1; + type=""; temp=-1; isok="-"; rsoc=-1; asoc=-1; rc=-1; cc=-1; me=-1; } /^BatteryType:/ { type=$2; } @@ -144,13 +143,15 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX /^Cycle Count:/ { cc=$3; } /^Max Error:/ { me=$3; } END { - printf "TYPE TEMP OK RSOC ASOC RC CC ME\n"; - printf "%-4s %-2d C %-4s %-5d %-5d %-5d %-5d %-2d\n", + if (type == "") { exit 0 }; + printf "\nBBU Information:\n" + printf "TYPE TEMP OK RSOC ASOC RC CC ME\n"; + printf "%-5s %2dC %-3s %4d%% %4d%% %4dmAh %4d %2d%%\n", type, temp, isok, rsoc, asoc, rc, cc, me; } ' - echo + echo # Give very long outputs. case "$daily_status_mfi_raid_verbose" in --Apple-Mail-8-182580230 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-8-182580230-- --Apple-Mail-9-182580349 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) iD8DBQFIRkf6Z88+mcQxRw0RAg/qAJ4lnQREkv5mBF3BdMw7w4foh4W4XwCggFP8 4UVw6p95NsPqTj+/0oEyfzk= =qKcQ -----END PGP SIGNATURE----- --Apple-Mail-9-182580349--