aboutsummaryrefslogtreecommitdiff
path: root/sysutils/linux-megacli
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2007-12-27 00:15:48 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2007-12-27 00:15:48 +0000
commitc519e1827c684e4adc8179dd3ae7996ae4b21a47 (patch)
tree914af0a4d202a3504a7d438c0d36da5d1d221a43 /sysutils/linux-megacli
parentbe3e6334f2fbd66fbe2131a28e3f2e4532ba9d90 (diff)
downloadports-c519e1827c684e4adc8179dd3ae7996ae4b21a47.tar.gz
ports-c519e1827c684e4adc8179dd3ae7996ae4b21a47.zip
Notes
Diffstat (limited to 'sysutils/linux-megacli')
-rw-r--r--sysutils/linux-megacli/Makefile5
-rw-r--r--sysutils/linux-megacli/files/407.status-mfi-raid.in6
-rw-r--r--sysutils/linux-megacli/files/README-status-mfi-raid.txt2
-rw-r--r--sysutils/linux-megacli/files/megacli.sh.in4
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