Index: head/sysutils/ipmitool/Makefile =================================================================== --- head/sysutils/ipmitool/Makefile (revision 292362) +++ head/sysutils/ipmitool/Makefile (revision 292363) @@ -1,58 +1,67 @@ # New ports collection makefile for: ipmitool # Date created: 25/Oct/2004 # Whom: Dmitry Frolov # # $FreeBSD$ # PORTNAME= ipmitool PORTVERSION= 1.8.11 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MASTER_SITES= SF MAINTAINER= spolyack@collaborativefusion.com COMMENT= CLI to manage IPMI systems USE_BZIP2= yes DOS2UNIX= ipmi_fwum.c USE_GMAKE= yes USE_OPENSSL= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --enable-intf-lan --enable-intf-lanplus \ +CONFIGURE_ARGS+=--enable-intf-lan --enable-intf-lanplus \ --disable-intf-imb --disable-intf-lipmi --disable-intf-bmc -PLIST_FILES= bin/ipmitool sbin/ipmievd share/ipmitool/oem_ibm_sel_map +PLIST_FILES= bin/ipmitool sbin/ipmievd share/ipmitool/oem_ibm_sel_map \ + ${PERIODIC_DIR}/400.status-ipmi PLIST_DIRS= share/ipmitool +PLIST_DIRSTRY= ${PERIODIC_DIR} +SUB_FILES= status-ipmi.sh PORTDOCS= AUTHORS COPYING ChangeLog README MAN1+= ${PORTNAME}.1 MAN8+= ipmievd.8 +PERIODIC_DIR= etc/periodic/daily + .if defined(WITH_DEBUG) CFLAGS+= -ggdb -Wall .endif .include + +post-install: + @${MKDIR} ${PREFIX}/${PERIODIC_DIR} + @${INSTALL_SCRIPT} ${WRKDIR}/status-ipmi.sh ${PREFIX}/${PERIODIC_DIR}/400.status-ipmi .if exists(/usr/include/sys/ipmi.h) CONFIGURE_ARGS+= --enable-intf-open .else CONFIGURE_ARGS+= --disable-intf-open .endif .if defined(WITH_FREEIPMI) || \ (exists(${LOCALBASE}/include/freeipmi/freeipmi.h) && \ !defined(WITHOUT_FREEIPMI)) LIB_DEPENDS+= freeipmi:${PORTSDIR}/sysutils/freeipmi CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS+= --enable-intf-free .else CONFIGURE_ARGS+= --disable-intf-free .endif .if defined(NOPORTDOCS) EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-Makefile.in .endif .include Property changes on: head/sysutils/ipmitool/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.24 \ No newline at end of property +1.25 \ No newline at end of property Index: head/sysutils/ipmitool/files/status-ipmi.sh.in =================================================================== --- head/sysutils/ipmitool/files/status-ipmi.sh.in (nonexistent) +++ head/sysutils/ipmitool/files/status-ipmi.sh.in (revision 292363) @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Check status of IPMI sensors and System Event Log +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +sdr_list_args=${daily_status_ipmi_sdr_list_args:-} +sel_list_args=${daily_status_ipmi_sel_list_args:-} +sel_cap_warn_pct=${daily_status_ipmi_sel_cap_warn_pct:-80} + +ipmitool=%%PREFIX%%/bin/ipmitool + +rc=0 + +case "${daily_status_ipmi_enable}" in + [Yy][Ee][Ss]) + if [ ! -x $ipmitool ]; then + echo "\$daily_status_ipmi_enable is set but ${ipmitool}" \ + "isn't executable" + exit 2 + fi + + echo "" + echo "Checking IPMI sensors:" + + $ipmitool sdr list $sdr_list_args && rc=1 || rc=3 + + echo "" + echo "Checking IPMI System Event Log:" + + info=`$ipmitool sel info` || exit 3 + used=$(echo "${info}" | awk '/Percent Used/{print 0 + $4}') + entries=$(echo "${info}" | awk '/Entries/{print 0 + $3}') + + if [ $used -gt $sel_cap_warn_pct ]; then + echo " SEL is at ${used}% capacity" + rc=3 + fi + + last=`cat /var/db/ipmi-sel-count 2>/dev/null || echo 0` + + if [ $entries -gt $last ]; then + echo $entries > /var/db/ipmi-sel-count + echo "" + $ipmitool sel list $sel_list_args + rc=3 + fi + ;; + *) + rc=0 + ;; +esac + +exit $rc \ No newline at end of file Property changes on: head/sysutils/ipmitool/files/status-ipmi.sh.in ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property