remove apc-upsd, requested by kirby@ long ago, and I was just reminded of it

by blambert. suggested replacements: apcupsd (similar name different program)
or NUT, both of which support USB UPS and some newer RS232 UPS than apc-upsd.
This commit is contained in:
sthen 2014-01-22 11:59:05 +00:00
parent fdb2c44ce7
commit e13dba956a
7 changed files with 1 additions and 134 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.309 2014/01/11 22:56:04 jeremy Exp $
# $OpenBSD: Makefile,v 1.310 2014/01/22 11:59:05 sthen Exp $
SUBDIR =
SUBDIR += accountsservice
SUBDIR += anacron
SUBDIR += ansible
SUBDIR += apachetop
SUBDIR += apc-upsd
SUBDIR += apcupsd
SUBDIR += apcd
SUBDIR += augeas

View File

@ -1,33 +0,0 @@
# $OpenBSD: Makefile,v 1.22 2013/03/11 11:41:29 espie Exp $
COMMENT= UPS software for APC UPS models
DISTNAME= apc-upsd
PKGNAME= ${DISTNAME}-19991128
REVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.knienieder.com/software/
PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c
EXTRACT_SUFX= .tgz
WRKDIST= ${WRKDIR}/${DISTNAME}/src
MAKE_FLAGS= CFLAGS="${CFLAGS}"
NO_TEST= Yes
pre-configure:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/apc_upsd.h
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/apc-upsd
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/apc-upsd
${INSTALL_PROGRAM} ${WRKSRC}/apc-upsd ${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/../doc/smart-protocol ${PREFIX}/share/doc/apc-upsd
${INSTALL_DATA} ${WRKSRC}/apc-upsd.conf ${PREFIX}/lib/apc-upsd
.include <bsd.port.mk>

View File

@ -1,5 +0,0 @@
MD5 (apc-upsd.tgz) = poeIo6XuzvZMlSta6KV6ig==
RMD160 (apc-upsd.tgz) = YIFzqSU8yh5oQ45XAMLWjfzuQ1Q=
SHA1 (apc-upsd.tgz) = OOKEjKtia6HnYJZv8CBhuqECGN0=
SHA256 (apc-upsd.tgz) = 6SsTNTsw4upL9Wu/hFaBSxxys3JjeDybUSEtFK9jHmw=
SIZE (apc-upsd.tgz) = 9246

View File

@ -1,74 +0,0 @@
$OpenBSD: patch-apc_smart_c,v 1.1 2012/03/17 10:35:10 sthen Exp $
--- apc_smart.c.orig Sat Mar 17 10:33:05 2012
+++ apc_smart.c Sat Mar 17 10:33:19 2012
@@ -93,7 +93,7 @@ int apc_smart_open ()
/* ------------------------------------------------------------------ */
-int getline(int fd, char *s)
+int get_line(int fd, char *s)
{
int i = 0;
int ending = 0;
@@ -158,8 +158,8 @@ static void apc_smart_test()
{
char answer[MAXLINE];
- apc_send_ups( 'Y' );getline( ups->pd, answer );
- apc_send_ups( 'A' );getline( ups->pd, answer );
+ apc_send_ups( 'Y' );get_line( ups->pd, answer );
+ apc_send_ups( 'A' );get_line( ups->pd, answer );
syslog( LOG_INFO, "test started.");
}
@@ -170,39 +170,39 @@ static int apc_ask_smart()
{
char answer[MAXLINE];
- apc_send_ups( 'Y' );getline( ups->pd, answer );
+ apc_send_ups( 'Y' );get_line( ups->pd, answer );
if ( ups->extended )
{
- apc_send_ups( 'f' ); getline( ups->pd, answer );
+ apc_send_ups( 'f' ); get_line( ups->pd, answer );
ups->BatLoad = atof(answer);
- apc_send_ups( 'N' ); getline( ups->pd, answer );
+ apc_send_ups( 'N' ); get_line( ups->pd, answer );
ups->LineMin = atof(answer);
- apc_send_ups( 'M' ); getline( ups->pd, answer );
+ apc_send_ups( 'M' ); get_line( ups->pd, answer );
ups->LineMax = atof(answer);
- apc_send_ups( 'P'); getline( ups->pd, answer );
+ apc_send_ups( 'P'); get_line( ups->pd, answer );
ups->UPSLoad = atof(answer);
- apc_send_ups('F'); getline( ups->pd, answer );
+ apc_send_ups('F'); get_line( ups->pd, answer );
ups->LineFreq = atof(answer);
- apc_send_ups( 'L'); getline( ups->pd, answer );
+ apc_send_ups( 'L'); get_line( ups->pd, answer );
ups->LineVoltage = atof(answer);
- apc_send_ups( 'O'); getline( ups->pd, answer );
+ apc_send_ups( 'O'); get_line( ups->pd, answer );
ups->OutputVoltage = atof(answer);
- apc_send_ups( 'C' ); getline( ups->pd, answer );
+ apc_send_ups( 'C' ); get_line( ups->pd, answer );
ups->UPSTemp = atof(answer);
- apc_send_ups('B'); getline( ups->pd, answer );
+ apc_send_ups('B'); get_line( ups->pd, answer );
ups->BattVoltage = atof(answer);
}
- apc_send_ups('Q'); getline( ups->pd, answer );
+ apc_send_ups('Q'); get_line( ups->pd, answer );
ups->Status = atoi(answer);
/* write info to syslog */

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-apc_upsd_h,v 1.1 2003/04/26 15:00:32 sturm Exp $
--- apc_upsd.h.orig Sat Apr 26 14:22:34 2003
+++ apc_upsd.h Sat Apr 26 14:22:57 2003
@@ -19,7 +19,7 @@
/* ---------------------------------------------------------------------- */
-#define UPS_DEFAULT_CONFIG_FILENAME "/etc/apc-upsd.conf"
+#define UPS_DEFAULT_CONFIG_FILENAME "%%SYSCONFDIR%%/apc-upsd.conf"
#define UPS_IDFILE "/var/run/apc-upsd.pid"
#define UPS_SCR "/sbin/halt"

View File

@ -1 +0,0 @@
apc-upsd is a daemon with flexible configuration for APC ups models.

View File

@ -1,7 +0,0 @@
@comment $OpenBSD: PLIST,v 1.7 2012/03/17 10:35:10 sthen Exp $
lib/apc-upsd/
lib/apc-upsd/apc-upsd.conf
@sample ${SYSCONFDIR}/apc-upsd.conf
@bin sbin/apc-upsd
share/doc/apc-upsd/
share/doc/apc-upsd/smart-protocol