diff options
author | pav <pav@FreeBSD.org> | 2004-08-17 17:25:37 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-08-17 17:25:37 +0800 |
commit | a3c633712adfa81dc2e1cacb038c54836bbf76d2 (patch) | |
tree | 47bad4536d289bdb19e6662682154ae473dfd826 /sysutils/openupsd/files | |
parent | 8188652aea92f3af47af9f17ff6854f3e67a37e8 (diff) | |
download | freebsd-ports-gnome-a3c633712adfa81dc2e1cacb038c54836bbf76d2.tar.gz freebsd-ports-gnome-a3c633712adfa81dc2e1cacb038c54836bbf76d2.tar.zst freebsd-ports-gnome-a3c633712adfa81dc2e1cacb038c54836bbf76d2.zip |
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>
Diffstat (limited to 'sysutils/openupsd/files')
-rw-r--r-- | sysutils/openupsd/files/openupsd.sh | 30 | ||||
-rw-r--r-- | sysutils/openupsd/files/patch-support.c | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/sysutils/openupsd/files/openupsd.sh b/sysutils/openupsd/files/openupsd.sh new file mode 100644 index 000000000000..d5610a224146 --- /dev/null +++ b/sysutils/openupsd/files/openupsd.sh @@ -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" diff --git a/sysutils/openupsd/files/patch-support.c b/sysutils/openupsd/files/patch-support.c new file mode 100644 index 000000000000..b18bb2828b85 --- /dev/null +++ b/sysutils/openupsd/files/patch-support.c @@ -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> |