diff options
author | bsam <bsam@FreeBSD.org> | 2007-12-27 08:15:48 +0800 |
---|---|---|
committer | bsam <bsam@FreeBSD.org> | 2007-12-27 08:15:48 +0800 |
commit | c94cbd3473cf56a9c40fd4a527505ed8524e365d (patch) | |
tree | cfda7f0bbed7f910d8b4289a378236691512d090 /sysutils/linux-megacli | |
parent | eee10066f397c0291549ceb848da4eab1cd3323d (diff) | |
download | freebsd-ports-gnome-c94cbd3473cf56a9c40fd4a527505ed8524e365d.tar.gz freebsd-ports-gnome-c94cbd3473cf56a9c40fd4a527505ed8524e365d.tar.zst freebsd-ports-gnome-c94cbd3473cf56a9c40fd4a527505ed8524e365d.zip |
Main changes:
- The periodic script should print a banner, like all other periodic script
- Don't sort the PD heading output, it breaks with certain numbering
Minor nits:
- Fix spelling
- pet portlint(1)
- Use awk(1) to alleviate the need for additional wc(1)
- remove non-portable -z flag to cmp(1)
PR: 118416
Submitted by: Ulrich Spoerlein <uspoerlein at gmail.com>
Reviewed by: maintainer timeout (3 weeks)
Diffstat (limited to 'sysutils/linux-megacli')
-rw-r--r-- | sysutils/linux-megacli/Makefile | 5 | ||||
-rw-r--r-- | sysutils/linux-megacli/files/407.status-mfi-raid.in | 6 | ||||
-rw-r--r-- | sysutils/linux-megacli/files/README-status-mfi-raid.txt | 2 | ||||
-rw-r--r-- | sysutils/linux-megacli/files/megacli.sh.in | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/sysutils/linux-megacli/Makefile b/sysutils/linux-megacli/Makefile index 6b2caf83d8cb..ae72fce2462d 100644 --- a/sysutils/linux-megacli/Makefile +++ b/sysutils/linux-megacli/Makefile @@ -7,7 +7,7 @@ PORTNAME= megacli PORTVERSION= 1.01.09 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils linux MASTER_SITES= http://lsi.com/files/support/rsa/MR_SAS_1.0/ PKGNAMEPREFIX= linux- @@ -28,7 +28,6 @@ SUB_FILES+= 407.status-mfi-raid RPM2CPIO?= ${LOCALBASE}/bin/rpm2cpio EXTRACT_DEPENDS+= ${RPM2CPIO}:${PORTSDIR}/archivers/rpm - post-extract: @cd ${WRKSRC} && \ ${UNZIP_CMD} MegaCliLin.zip && \ @@ -39,7 +38,7 @@ do-build: do-install: ${INSTALL_SCRIPT} ${WRKSRC}/megacli.sh ${PREFIX}/sbin/megacli - ${MKDIR} -p ${PREFIX}/etc/periodic/daily + ${MKDIR} ${PREFIX}/etc/periodic/daily ${INSTALL_SCRIPT} ${WRKSRC}/407.status-mfi-raid ${PREFIX}/etc/periodic/daily ${INSTALL_PROGRAM} ${WRKSRC}/usr/sbin/MegaCli ${PREFIX}/libexec diff --git a/sysutils/linux-megacli/files/407.status-mfi-raid.in b/sysutils/linux-megacli/files/407.status-mfi-raid.in index 609709797071..54c58a9cb35f 100644 --- a/sysutils/linux-megacli/files/407.status-mfi-raid.in +++ b/sysutils/linux-megacli/files/407.status-mfi-raid.in @@ -22,6 +22,8 @@ logdir=${logdir:-/var/log} case "$daily_status_mfi_raid_enable" in [Yy][Ee][Ss]) + echo + echo 'Checking status of MFI RAID controllers:' ;; *) exit 0 @@ -58,12 +60,12 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX} ${ADPMAXIDX}`; do # Print summary information. echo "------------------------------------------------------------------------" echo "Physical Drive Information:" + echo "ENC SLO DEV SEQ MEC OEC PFC LPF STATE" ${megacli} -PDList -a${ctrl} | \ awk ' BEGIN { E=-1; S=-1; D=-1; s=-1; mec=-1; oec=-1; pfc=-1; lpfeqn=-1; state=""; - printf "ENC SLO DEV SEQ MEC OEC PFC LPF STATE\n"; } /^Enclosure Number:/ { E=$3; } /^Slot Number:/ { S=$3; } @@ -199,7 +201,7 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX} ${ADPMAXIDX}`; do # Now show the differences or the entire log. case "$daily_status_mfi_raid_persist_logs" in [Yy][Ee][Ss]) - cmp -zs ${ctrl_log}.yesterday ${ctrl_log}.today + cmp -s ${ctrl_log}.yesterday ${ctrl_log}.today raid_rc=$? if test $raid_rc -ne 0; then diff -u ${ctrl_log}.yesterday ${ctrl_log}.today | \ diff --git a/sysutils/linux-megacli/files/README-status-mfi-raid.txt b/sysutils/linux-megacli/files/README-status-mfi-raid.txt index 3dae7a7da976..7f6cbae76998 100644 --- a/sysutils/linux-megacli/files/README-status-mfi-raid.txt +++ b/sysutils/linux-megacli/files/README-status-mfi-raid.txt @@ -1,7 +1,7 @@ # $FreeBSD$ The output of periodic/daily/407.status-mfi-raid uses several -abbreviations. This documents maps the abbreviations to the +abbreviations. This document maps the abbreviations to the names MegaCli uses, which were just too long for summary mails. Section 'Physical Drive Information:' diff --git a/sysutils/linux-megacli/files/megacli.sh.in b/sysutils/linux-megacli/files/megacli.sh.in index f28e45bc8a97..faca0d4ae890 100644 --- a/sysutils/linux-megacli/files/megacli.sh.in +++ b/sysutils/linux-megacli/files/megacli.sh.in @@ -13,12 +13,12 @@ if ! [ `sysctl -n compat.linux.osrelease` = "2.6.12" ]; then exit 1 fi -lpfs=`mount -t linprocfs | wc -l | awk '{ print $1 }'` +lpfs=`mount -t linprocfs | awk 'END{ print NR }'` if [ ${lpfs} -le 0 ]; then echo "You need to mount linprocfs to run `basename $0`." >&2 exit 1 fi -lsfs=`mount -t linsysfs | wc -l | awk '{ print $1 }'` +lsfs=`mount -t linsysfs | awk 'END{ print NR }'` if [ ${lsfs} -le 0 ]; then echo "You need to mount linsysfs to run `basename $0`." >&2 exit 1 |