Date: Tue, 12 Jan 2010 02:59:02 GMT From: Boris Kochergin <spawk@acm.poly.edu> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/142735: New port: sysutils/geomWatch -- Watches for and e-mails administrators about GEOM state changes Message-ID: <201001120259.o0C2x2fi052556@www.freebsd.org> Resent-Message-ID: <201001120300.o0C30Iax063364@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 142735 >Category: ports >Synopsis: New port: sysutils/geomWatch -- Watches for and e-mails administrators about GEOM state changes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 12 03:00:17 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Boris Kochergin >Release: 8.0-RELEASE-p1 >Organization: Polytechnic Institute of NYU >Environment: FreeBSD peer 8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #4: Sat Dec 12 19:33:12 EST 2009 root@peer:/usr/obj/usr/src/sys/PEER i386 >Description: geomWatch is a program for monitoring the well-being of GEOM providers. It checks the state of each configured provider at a configured interval, and, if it notices that a provider has lost a component, or encounters a problem while checking a provider's state, it will send an e-mail with details of the matter--such as what components were lost and which remain, or, in the event of a problem, what the problem was--to an arbitrary number of recipients, so that corrective action can be taken (for example, replacing a failed disk). WWW: http://acm.poly.edu/wiki/GEOM_Watch >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # geomWatch # geomWatch/Makefile # geomWatch/pkg-descr # geomWatch/files # geomWatch/files/pkg-message.in # geomWatch/files/geomWatch.in # geomWatch/distinfo # echo c - geomWatch mkdir -p geomWatch > /dev/null 2>&1 echo x - geomWatch/Makefile sed 's/^X//' >geomWatch/Makefile << 'END-of-geomWatch/Makefile' X# New ports collection makefile for: geomWatch X# Date created: 11 January 2010 X# Whom: Boris Kochergin <spawk@acm.poly.edu> X# X# $FreeBSD$ X# X XPORTNAME= geomWatch XPORTVERSION= 1.0.0 XCATEGORIES= sysutils XMASTER_SITES= http://isis.poly.edu/~bk/geomWatch/ \ X http://bk.macroblock.net/geomWatch/ XEXTRACT_SUFX= .tbz X XMAINTAINER= spawk@acm.poly.edu XCOMMENT= Watches for and e-mails admins about GEOM state changes X XLIB_DEPENDS= esmtp.6:${PORTSDIR}/mail/libesmtp X XPLIST_FILES= sbin/geomWatch \ X etc/geomWatch.conf.sample X XSUB_FILES= pkg-message geomWatch X Xpost-install: X ${INSTALL_SCRIPT} ${WRKDIR}/geomWatch ${PREFIX}/etc/rc.d/geomWatch X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-geomWatch/Makefile echo x - geomWatch/pkg-descr sed 's/^X//' >geomWatch/pkg-descr << 'END-of-geomWatch/pkg-descr' XgeomWatch is a program for monitoring the well-being of GEOM providers. It Xchecks the state of each configured provider at a configured interval, and, if Xit notices that a provider has lost a component, or encounters a problem while Xchecking a provider's state, it will send an e-mail with details of the Xmatter--such as what components were lost and which remain, or, in the event of Xa problem, what the problem was--to an arbitrary number of recipients, so that Xcorrective action can be taken (for example, replacing a failed disk). X XWWW: http://acm.poly.edu/wiki/GEOM_Watch X X-Boris Kochergin <spawk@acm.poly.edu> END-of-geomWatch/pkg-descr echo c - geomWatch/files mkdir -p geomWatch/files > /dev/null 2>&1 echo x - geomWatch/files/pkg-message.in sed 's/^X//' >geomWatch/files/pkg-message.in << 'END-of-geomWatch/files/pkg-message.in' X XA sample geomWatch configuration file has been installed as X%%PREFIX%%/etc/smartd.conf.sample. You should copy it to X%%PREFIX%%/etc/smartd.conf, edit it to your liking, and add the following line Xto /etc/rc.conf: X Xgeomwatch_enable="YES" X XFinally, to start geomWatch, run the following command: X X%%PREFIX%%/etc/rc.d/geomWatch start X END-of-geomWatch/files/pkg-message.in echo x - geomWatch/files/geomWatch.in sed 's/^X//' >geomWatch/files/geomWatch.in << 'END-of-geomWatch/files/geomWatch.in' X#!/bin/sh X# $FreeBSD X X# PROVIDE: geomwatch X# REQUIRE: DAEMON X# BEFORE: LOGIN X# KEYWORD: shutdown X X# Define these geomwatch_* variables in one of these files: X# /etc/rc.conf X# /etc/rc.conf.local X# /etc/rc.conf.d/geomwatch X# X# DO NOT CHANGE THESE DEFAULT VALUES HERE X# Xgeomwatch_enable="${geomwatch_enable-NO}" Xgeomwatch_pidfile="/var/run/geomWatch.pid" X X. /etc/rc.subr X Xname="geomwatch" Xrcvar=`set_rcvar` Xcommand="%%PREFIX%%/sbin/geomWatch" X Xload_rc_config $name X X: ${geomwatch_config="%%PREFIX%%/etc/geomWatch.conf"} X: ${geomwatch_flags="-c ${geomwatch_config}"} X Xpidfile="${geomwatch_pidfile}" Xrequired_files="${geomwatch_config}" X Xcase "${geomwatch_flags}" in X*-p\ *) X echo "ERROR: \$geomwatch_flags includes -p option." \ X "Please use \$geomwatch_pidfile instead." X exit 1 X ;; X*) X geomwatch_flags="-p ${pidfile} ${geomwatch_flags}" X ;; Xesac X Xrun_rc_command "$1" END-of-geomWatch/files/geomWatch.in echo x - geomWatch/distinfo sed 's/^X//' >geomWatch/distinfo << 'END-of-geomWatch/distinfo' XMD5 (geomWatch-1.0.0.tbz) = ade5c2498ff08975e70600ef065b0945 XSHA256 (geomWatch-1.0.0.tbz) = 3cad58a1ffb036f941f59b1f4699b5cf3cca6435a960639fd53f176788479501 XSIZE (geomWatch-1.0.0.tbz) = 6181 END-of-geomWatch/distinfo exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001120259.o0C2x2fi052556>