Use gettext module.
Correctly install _ups user and group. Add better defaults config. looks ok to sthen@
This commit is contained in:
parent
f0c18abbc3
commit
64b561914e
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.34 2010/03/03 20:39:15 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.35 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
|
||||
COMMENT-main= UPS monitoring program supporting many brands
|
||||
COMMENT-cgi= CGIs for monitoring Nut-based UPSs
|
||||
COMMENT-snmp= driver for monitoring UPSs via SNMP
|
||||
|
||||
DISTNAME= nut-2.4.1
|
||||
PKGNAME-main= ${DISTNAME}p2
|
||||
PKGNAME-main= ${DISTNAME}p3
|
||||
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}p0
|
||||
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}p0
|
||||
CATEGORIES= sysutils
|
||||
@ -20,9 +20,12 @@ PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
WANTLIB-main= c crypto expat iconv intl m ssl z \
|
||||
asn1 gssapi krb5
|
||||
WANTLIB-snmp= c crypto
|
||||
|
||||
WANTLIB += c crypto
|
||||
WANTLIB-main += ${WANTLIB}
|
||||
WANTLIB-main += expat m ssl z asn1 gssapi krb5
|
||||
|
||||
MODULES= devel/gettext
|
||||
|
||||
WEB_ROOT= /var/www
|
||||
NUT_USER= _ups
|
||||
@ -46,13 +49,18 @@ MULTI_PACKAGES= -main -cgi
|
||||
MULTI_PACKAGES+= -snmp
|
||||
.endif
|
||||
|
||||
LIB_DEPENDS-main= usb::devel/libusb \
|
||||
LIB_DEPENDS-main= ${MODGETTEXT_LIB_DEPENDS} \
|
||||
usb::devel/libusb \
|
||||
neon::net/neon
|
||||
|
||||
PREFIX-cgi= ${WEB_ROOT}
|
||||
WANTLIB-cgi=
|
||||
|
||||
LIB_DEPENDS-snmp= netsnmp::net/net-snmp
|
||||
RUN_DEPENDS-snmp= # empty
|
||||
|
||||
LIB_DEPENDS-cgi= # empty
|
||||
RUN_DEPENDS-cgi= # empty
|
||||
|
||||
.if ${MULTI_PACKAGES:M-cgi}
|
||||
BUILD_DEPENDS+= :gd->=1.8.3:graphics/gd
|
||||
|
35
sysutils/nut/patches/patch-conf_ups_conf_sample
Normal file
35
sysutils/nut/patches/patch-conf_ups_conf_sample
Normal file
@ -0,0 +1,35 @@
|
||||
$OpenBSD: patch-conf_ups_conf_sample,v 1.1 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
--- conf/ups.conf.sample.orig Fri Mar 12 10:19:28 2010
|
||||
+++ conf/ups.conf.sample Fri Mar 12 10:18:48 2010
|
||||
@@ -47,7 +47,7 @@
|
||||
# apcsmart, bestups, and sec are some examples.
|
||||
#
|
||||
# port: REQUIRED. The serial port where your UPS is connected.
|
||||
-# /dev/ttyS0 is usually the first port on Linux boxes, for example.
|
||||
+# /dev/tty00 is usually the first port on OpenBSD boxes, for example.
|
||||
#
|
||||
# sdorder: optional. When you have multiple UPSes on your system, you
|
||||
# usually need to turn them off in a certain order. upsdrvctl
|
||||
@@ -83,11 +83,11 @@
|
||||
# --------
|
||||
#
|
||||
# A simple example for a UPS called "powerpal" that uses the megatec
|
||||
-# driver on /dev/ttyS0 is:
|
||||
+# driver on /dev/tty00 is:
|
||||
#
|
||||
# [powerpal]
|
||||
# driver = megatec
|
||||
-# port = /dev/ttyS0
|
||||
+# port = /dev/tty00
|
||||
# desc = "Web server"
|
||||
#
|
||||
# If your UPS driver requires additional settings, you can specify them
|
||||
@@ -96,7 +96,7 @@
|
||||
#
|
||||
# [myups]
|
||||
# driver = mydriver
|
||||
-# port = /dev/ttyS1
|
||||
+# port = /dev/tty01
|
||||
# cable = 1234
|
||||
# desc = "Something descriptive"
|
||||
#
|
12
sysutils/nut/patches/patch-conf_upsmon_conf_sample
Normal file
12
sysutils/nut/patches/patch-conf_upsmon_conf_sample
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-conf_upsmon_conf_sample,v 1.1 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
--- conf/upsmon.conf.sample.orig Fri Mar 12 10:32:24 2010
|
||||
+++ conf/upsmon.conf.sample Fri Mar 12 10:33:02 2010
|
||||
@@ -109,7 +109,7 @@ MINSUPPLIES 1
|
||||
#
|
||||
# This should work just about everywhere ... if it doesn't, well, change it.
|
||||
|
||||
-SHUTDOWNCMD "/sbin/shutdown -h +0"
|
||||
+SHUTDOWNCMD "/sbin/shutdown -hp +0"
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# NOTIFYCMD <command>
|
@ -1,10 +1,11 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.5 2009/04/03 15:40:12 sthen Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.6 2010/03/20 17:11:40 ajacoutot Exp $
|
||||
@conflict upsd-*
|
||||
@pkgpath sysutils/nut
|
||||
@pkgpath sysutils/nut,no_cgi
|
||||
@pkgpath sysutils/nut,snmp
|
||||
@pkgpath sysutils/nut,no_cgi,snmp
|
||||
@newuser ${NUT_USER}:${NUT_ID}:::UPS User:/var/empty:/sbin/nologin
|
||||
@newgroup ${NUT_USER}:${NUT_ID}
|
||||
@newuser ${NUT_USER}:${NUT_ID}:${NUT_ID}::UPS User:/var/empty:/sbin/nologin
|
||||
%%SHARED%%
|
||||
@bin bin/apcsmart
|
||||
@bin bin/bcmxcp
|
||||
|
Loading…
Reference in New Issue
Block a user