summaryrefslogtreecommitdiff
path: root/sysutils/upsd/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/upsd/files')
-rw-r--r--sysutils/upsd/files/patch-aa17
-rw-r--r--sysutils/upsd/files/patch-ab11
-rw-r--r--sysutils/upsd/files/patch-ac9
-rw-r--r--sysutils/upsd/files/patch-ad32
-rw-r--r--sysutils/upsd/files/patch-misc.c47
-rw-r--r--sysutils/upsd/files/upsd.conf100
-rw-r--r--sysutils/upsd/files/upsd.sh20
7 files changed, 0 insertions, 236 deletions
diff --git a/sysutils/upsd/files/patch-aa b/sysutils/upsd/files/patch-aa
deleted file mode 100644
index 52fcb8746eb4..000000000000
--- a/sysutils/upsd/files/patch-aa
+++ /dev/null
@@ -1,17 +0,0 @@
---- Makefile.orig 1996-08-02 23:44:24.000000000 +0200
-+++ Makefile 2012-07-01 19:12:23.000000000 +0200
-@@ -8,12 +8,11 @@
-
- PROG= upsd
-
--BINDIR= /usr/local/sbin
--MANDIR= /usr/local/share/man
-+BINDIR= ${PREFIX}/sbin
- NOMAN= noway
-
- #DEBUG= -g -DDEBUG
--CFLAGS+=-I../include ${DEBUG} -Wall -O6 # -pedantic
-+CFLAGS+=-I../include ${DEBUG} -Wall # -pedantic
- LDADD=
-
- CLEANFILES+=*.core y.*
diff --git a/sysutils/upsd/files/patch-ab b/sysutils/upsd/files/patch-ab
deleted file mode 100644
index c86395b570f5..000000000000
--- a/sysutils/upsd/files/patch-ab
+++ /dev/null
@@ -1,11 +0,0 @@
---- config.h.orig Mon Feb 23 17:50:34 1998
-+++ config.h Mon Feb 23 17:50:49 1998
-@@ -8,7 +8,7 @@
- */
-
- #ifndef DEBUG
--#define _PATH_UPSD_CONF "/etc/upsd.conf"
-+#define _PATH_UPSD_CONF "@prefix@/etc/upsd.conf"
- #define _PATH_UPSD_PID "/var/run/upsd.pid"
- #else
- #define _PATH_UPSD_CONF "sample/upsd.conf"
diff --git a/sysutils/upsd/files/patch-ac b/sysutils/upsd/files/patch-ac
deleted file mode 100644
index 1b1899a6a957..000000000000
--- a/sysutils/upsd/files/patch-ac
+++ /dev/null
@@ -1,9 +0,0 @@
---- upsd.h.orig Fri Jul 3 13:52:01 1998
-+++ upsd.h Fri Jul 3 13:52:21 1998
-@@ -206,5 +206,5 @@
-
- #define TERMINATE kill(getpid(), SIGTERM)
-
--#include "config.h"
-+#include "conf.h"
- #include "proto.h"
diff --git a/sysutils/upsd/files/patch-ad b/sysutils/upsd/files/patch-ad
deleted file mode 100644
index d4677deeb4d5..000000000000
--- a/sysutils/upsd/files/patch-ad
+++ /dev/null
@@ -1,32 +0,0 @@
---- apc.c.orig Fri Aug 2 23:44:22 1996
-+++ apc.c Tue Dec 8 16:59:03 1998
-@@ -164,12 +164,12 @@
- }
- if((r->type & T_TYPE) == T_BINARY) {
- if(!bcmp(v1.val.binary, v0.val.binary, r->size)) {
-- syslog(LOG_WARNING, "apc_tune: toggle wraparound");
-+ syslog(LOG_WARNING, "apc_tune: toggle wraparound register %s", r->name);
- return 1;
- }
- } else {
- if(v1.val.number == v0.val.number) {
-- syslog(LOG_WARNING, "apc_tune: toggle wraparound");
-+ syslog(LOG_WARNING, "apc_tune: toggle wraparound register %s", r->name);
- return 1;
- }
- }
---- apc_static.c.orig Fri Aug 2 23:44:23 1996
-+++ apc_static.c Tue Dec 8 16:56:57 1998
-@@ -91,9 +91,12 @@
- {SMART_LOWBATDUR, {number: 7}},
- {SMART_LOWBATDUR, {number: 10}},
-
-+ /* several models accept different values here */
- {SMART_WAKEUPBCAP, {number: 0}},
- {SMART_WAKEUPBCAP, {number: 10}},
-+ {SMART_WAKEUPBCAP, {number: 15}},
- {SMART_WAKEUPBCAP, {number: 25}},
-+ {SMART_WAKEUPBCAP, {number: 50}},
- {SMART_WAKEUPBCAP, {number: 90}},
- {SMART_WAKEUPBCAP, {number: 100}},
-
diff --git a/sysutils/upsd/files/patch-misc.c b/sysutils/upsd/files/patch-misc.c
deleted file mode 100644
index 39abcc43c05a..000000000000
--- a/sysutils/upsd/files/patch-misc.c
+++ /dev/null
@@ -1,47 +0,0 @@
---- misc.c.orig Sat Aug 3 01:44:24 1996
-+++ misc.c Mon Dec 18 21:03:19 2006
-@@ -27,7 +27,7 @@
- pathname);
- return -1;
- }
-- fprintf(f, "%ld\n", getpid());
-+ fprintf(f, "%u\n", getpid());
- fclose(f);
- umask(oldmask);
- return 0;
-@@ -60,7 +60,7 @@
- {
- register char *p;
- if((p = malloc(size)) == NULL) {
-- syslog(LOG_ERR, "xalloc: cannot allocate %ls bytes: %m", size);
-+ syslog(LOG_ERR, "xalloc: cannot allocate %u bytes: %m", size);
- return NULL;
- }
- return p;
-@@ -105,7 +105,7 @@
- if(((struct ident *)list)->id == 0) {
- return NULL;
- }
-- (char *)list += size;
-+ list += size;
- }
- return list;
- }
-@@ -122,7 +122,7 @@
- register void *list;
- register size_t size;
- {
-- for(;((struct ident *)list)->id != 0;(char *)list += size) {
-+ for(;((struct ident *)list)->id != 0;list += size) {
- if(((struct ident *)list)->name == name) {
- return list;
- }
-@@ -255,7 +255,7 @@
- int
- getcurrenttime(void)
- {
-- if(time(&current_time) == NULL) {
-+ if(time(&current_time) == -1) {
- syslog(LOG_ERR, "cannot get current time: %m");
- return -1;
- }
diff --git a/sysutils/upsd/files/upsd.conf b/sysutils/upsd/files/upsd.conf
deleted file mode 100644
index 935d7c6dd835..000000000000
--- a/sysutils/upsd/files/upsd.conf
+++ /dev/null
@@ -1,100 +0,0 @@
-# $FreeBSD$
-#
-# UPS Daemon
-# The Wild Wind Communications, 1995, 1996
-#
-# See file LICENSE for the distribution terms of this software.
-#
-
-ups "smart-ups" (230) proto "apc-smart" {
- device "/dev/cuaa0"
- speed 2400
- read-timeout 2
- write-block-size 1
- write-block-delay 50
- queue-size 64
-}
-
-every 5 { # check events every 5 seconds
- nop
-}
-
-on "initialize" != "SM" {
- poll "initialize"
- after 60 every 60 {
- log emerg "Cannot put the UPS into smart mode!"
- }
-}
-
-every 600 {
- tune "high-transfer-point" 264
- tune "low-transfer-point" 196
- tune "line-alarm" "0"
- tune "line-sensitivity" "L"
- tune "low-batteries-duration" 2
- tune "nominal-voltage" 220
- tune "shutdown-delay" 20
- tune "wakeup-batteries-capacity" 25
- tune "wakeup-delay" 0
-# tune "batteries-replaced" "01/01/77"
-# tune "label" "WildWind"
-}
-
-every 300 { # poll the UPS
- poll "last-test"
-# poll "light-test"
- poll "line-frequency"
- poll "line-maxvac"
- poll "line-minvac"
- poll "line-voltage"
- poll "load"
- poll "recharge"
- poll "temperature"
- poll "vdc"
- poll "voltage"
-
- log notice "last test: %last-test%, light test: %light-test%"
- log notice "frequency: %line-frequency%, maxvac: %line-maxvac%, minvac: %line-minvac%, voltage: %line-voltage%"
- log notice "load: %load%, recharge: %recharge%, temp: %temperature%, vdc: %vdc%, output voltage: %voltage%"
-
- on "load" > 95 {
- log alert "UPS load is too high: %load%"
- }
-}
-
-on "line-fail" {
- log emerg "*** ALERT! Source power line failed, save your work! ***"
-}
-
-on "line-fail" after 30 {
- log emerg "*** ALERT! System shutdown in 30 seconds, LOGOUT NOW! ***"
-}
-
-on "line-restore" {
- log emerg "Source power line restored, you may continue your work."
-}
-
-on "line-fail" after 60 {
- log emerg "*** ALERT! THE SYSTEM IS SHUTTING DOWN! ***"
-
- poll "shutdown"
- poll "shutdown"
- poll "power-test"
- poll "power-test"
- poll "shutdown"
- poll "shutdown"
-
- sleep 2
-
- exec "/sbin/halt &"
-
- poll "power-test"
- poll "shutdown"
- poll "power-test"
- poll "shutdown"
- poll "power-test"
- poll "shutdown"
- poll "power-test"
-
- sleep 1000 # let us wait peacefully
-}
diff --git a/sysutils/upsd/files/upsd.sh b/sysutils/upsd/files/upsd.sh
deleted file mode 100644
index e8540a141b31..000000000000
--- a/sysutils/upsd/files/upsd.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
-case "$1" in
- start)
- [ -x ${PREFIX}/sbin/upsd ] && ${PREFIX}/sbin/upsd && echo -n ' upsd'
- ;;
- stop)
- [ -f /var/run/upsd.pid ] && kill -QUIT `cat /var/run/upsd.pid` && echo -n ' upsd'
- ;;
- *)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
- esac
-
-exit 0