From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 30 15:10:06 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 62571106564A for ; Fri, 30 May 2008 15:10:06 +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 6440A8FC17 for ; Fri, 30 May 2008 15:10:06 +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 m4UFA6wi062662 for ; Fri, 30 May 2008 15:10:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4UFA6Ml062661; Fri, 30 May 2008 15:10:06 GMT (envelope-from gnats) Date: Fri, 30 May 2008 15:10:06 GMT Message-Id: <200805301510.m4UFA6Ml062661@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Ulrich Spoerlein 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: Ulrich Spoerlein List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2008 15:10:06 -0000 The following reply was made to PR ports/123697; it has been noted by GNATS. From: Ulrich Spoerlein To: Ruben van Staveren Cc: bug-followup@FreeBSD.org Subject: Re: ports/123697: [PATCH] sysutils/linux-megacli: Fix periodic script after update Date: Fri, 30 May 2008 17:07:12 +0200 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. Cheers, Ulrich Spoerlein --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diif 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 --SUOF0GtieIMvvwua--