Add openupsd, a UPS daemon, pretty specific to those Belkin

serial-connected UPS's that speak the "regulator pro smart protocol".
This daemon is monitoring only, at the moment anyway.

PR:		ports/70490
Submitted by:	Tim Bishop <tim@bishnet.net>
This commit is contained in:
Pav Lucistnik 2004-08-17 09:25:37 +00:00
parent 7602e7208d
commit bc8ecab0f4
6 changed files with 78 additions and 0 deletions

View file

@ -264,6 +264,7 @@
SUBDIR += nwclient602
SUBDIR += obliterate
SUBDIR += open
SUBDIR += openupsd
SUBDIR += p5-File-Which
SUBDIR += p5-Filesys-DiskFree
SUBDIR += p5-Filesys-DiskSpace

View file

@ -0,0 +1,30 @@
# New ports collection makefile for: openupsd
# Date created: 15 August 2004
# Whom: Tim Bishop <tim@bishnet.net>
#
# $FreeBSD$
#
PORTNAME= openupsd
PORTVERSION= 0.3.0
CATEGORIES= sysutils
MASTER_SITES= http://frmb.org/download/
MAINTAINER= tim@bishnet.net
COMMENT= A UPS daemon for some Belkin UPS's
USE_RC_SUBR= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-transform-name= --bindir=${PREFIX}/sbin
PLIST_FILES= sbin/openupsd etc/openupsd.conf.sample etc/rc.d/openupsd.sh
post-extract:
@${SED} -e 's#%%RC_SUBR%%#${RC_SUBR}#g' -e 's#%%PREFIX%%#${PREFIX}#g' \
${FILESDIR}/openupsd.sh > ${WRKDIR}/openupsd.sh
post-install:
${INSTALL_DATA} ${WRKSRC}/openupsd.conf ${PREFIX}/etc/openupsd.conf.sample
${INSTALL_SCRIPT} ${WRKDIR}/openupsd.sh ${PREFIX}/etc/rc.d/
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
MD5 (openupsd-0.3.0.tar.gz) = 99cecb372895a8a08d9ae5b2d428a606
SIZE (openupsd-0.3.0.tar.gz) = 120596

View file

@ -0,0 +1,30 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: openupsd
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
openupsd_enable=${openupsd_enable:-"NO"}
. %%RC_SUBR%%
name="openupsd"
rcvar=`set_rcvar`
start_cmd="${name}_start"
stop_cmd="${name}_stop"
openupsd_start()
{
%%PREFIX%%/sbin/openupsd
}
openupsd_stop()
{
killall openupsd
}
load_rc_config $name
run_rc_command "$1"

View file

@ -0,0 +1,10 @@
--- support.c.bak Sun Aug 15 16:26:05 2004
+++ support.c Sun Aug 15 16:26:13 2004
@@ -23,7 +23,6 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
-#include <malloc.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <termios.h>

View file

@ -0,0 +1,5 @@
OpenUPSd is a UPS daemon, pretty specific to those Belkin
serial-connected UPS's that speak the "regulator pro smart protocol".
This daemon is monitoring only, at the moment anyway.
WWW: http://frmb.org/openupsd.html