summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2003-10-20 10:37:15 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2003-10-20 10:37:15 +0000
commita7c1be35090deb2bbc86e7ff99f21e96fa83d55f (patch)
tree9aba97accfa27a83768ca1274b44fda1cf0a76e3 /net-misc/nut
parentadd seperate upsdrv init script, make sure it gets called properly, fixes bug... (diff)
downloadhistorical-a7c1be35090deb2bbc86e7ff99f21e96fa83d55f.tar.gz
historical-a7c1be35090deb2bbc86e7ff99f21e96fa83d55f.tar.bz2
historical-a7c1be35090deb2bbc86e7ff99f21e96fa83d55f.zip
add seperate upsdrv init script, make sure it gets called properly, fixes bug #31572
Diffstat (limited to 'net-misc/nut')
-rw-r--r--net-misc/nut/Manifest12
-rw-r--r--net-misc/nut/files/digest-nut-1.4.0-r21
-rw-r--r--net-misc/nut/files/digest-nut-1.5.6-r11
-rw-r--r--net-misc/nut/files/upsd.rc612
-rw-r--r--net-misc/nut/files/upsdrv.rc625
-rw-r--r--net-misc/nut/files/upsmon.rc616
-rw-r--r--net-misc/nut/nut-1.4.0-r2.ebuild82
-rw-r--r--net-misc/nut/nut-1.5.6-r1.ebuild82
8 files changed, 208 insertions, 23 deletions
diff --git a/net-misc/nut/Manifest b/net-misc/nut/Manifest
index 27a610b52e2c..c18c2abc635b 100644
--- a/net-misc/nut/Manifest
+++ b/net-misc/nut/Manifest
@@ -1,14 +1,14 @@
MD5 2c9fa39986df9dcb14d2f67dcbf0234b nut-1.4.0.ebuild 3361
MD5 310e9a3f33c9e15939745e45489556bc nut-1.0.0.ebuild 2526
MD5 fa6914c5f0e8bd3bdf5cb180cda1a7db nut-1.2.1.ebuild 2920
-MD5 427411a2326d4e9a095069aa54426b9d nut-1.4.0-r2.ebuild 2158
-MD5 c34fda646901a58698c2ed2eab0bc536 nut-1.5.6-r1.ebuild 2160
+MD5 3920619265957e6f145b6571b75eb5b7 nut-1.4.0-r2.ebuild 2162
+MD5 69b226256463ebe6b02fb64cd0c66ff2 nut-1.5.6-r1.ebuild 2166
MD5 78a59e58e70f1e9bfe6aa60ca169f4ed nut-1.3.6.ebuild 3361
MD5 3628d50f02132fb127fdce3e1b6998ae nut-1.4.0-r1.ebuild 2124
MD5 b0b485ebdd80433949e448f5687a57e4 nut-1.2.2.ebuild 3282
MD5 47b88ec6b9c1a051634d18ab1f8aeb5e nut-1.2.1-r1.ebuild 3236
MD5 f0906ece798f5451eae9db07a9440616 nut-1.5.6.ebuild 2126
-MD5 4ea22429f5a5e2ef06016ef821fa5bd5 ChangeLog 3081
+MD5 fcffc3bc969069850ea7d5bafc75bef6 ChangeLog 3084
MD5 5b93ea4cc6824bb99a84599be7f8c67e nut-1.5.1.ebuild 3365
MD5 91a159b983332d5ed0fb985cc1fe1b80 metadata.xml 330
MD5 53b3c22e90b76d9ed4ac9cbbef393c31 files/digest-nut-1.0.0 61
@@ -23,7 +23,7 @@ MD5 4f6c951306e95660e88086bc591f03d0 files/digest-nut-1.2.1-r1 61
MD5 de17bbc812bdd76ec7b807a0deb5e636 files/digest-nut-1.4.0-r1 61
MD5 de17bbc812bdd76ec7b807a0deb5e636 files/digest-nut-1.4.0-r2 61
MD5 7ae6f61ceeee54557c5ad414688b82d0 files/digest-nut-1.5.6-r1 61
-MD5 6caea4dbd62fccba5dff45c183ee5f52 files/upsd.rc6 598
-MD5 4bdc99ec37a35dc1033e507868df4de7 files/upsdrv.rc6 554
-MD5 53b97b8faf068b82ac77f950f595b758 files/upsmon.rc6 505
+MD5 9d77b0cac87417e4a1342dc77c2eb802 files/upsd.rc6 602
+MD5 49c23b0491335e3b2c8ebb2bd158f8b9 files/upsdrv.rc6 560
+MD5 31710c0d6fba08ad710eb5decb581830 files/upsmon.rc6 509
MD5 0ccb6317ab10b2a782b259790c4cd209 files/upsd-init 595
diff --git a/net-misc/nut/files/digest-nut-1.4.0-r2 b/net-misc/nut/files/digest-nut-1.4.0-r2
new file mode 100644
index 000000000000..1a233a0f22a5
--- /dev/null
+++ b/net-misc/nut/files/digest-nut-1.4.0-r2
@@ -0,0 +1 @@
+MD5 1ddf547866db0f1eeb9c535ba0339906 nut-1.4.0.tar.gz 523924
diff --git a/net-misc/nut/files/digest-nut-1.5.6-r1 b/net-misc/nut/files/digest-nut-1.5.6-r1
new file mode 100644
index 000000000000..5edaab2f6e61
--- /dev/null
+++ b/net-misc/nut/files/digest-nut-1.5.6-r1
@@ -0,0 +1 @@
+MD5 59d0e0952a68fa04a63a25bc181a68c0 nut-1.5.6.tar.gz 479689
diff --git a/net-misc/nut/files/upsd.rc6 b/net-misc/nut/files/upsd.rc6
index dff8ea70e345..116b29f69cde 100644
--- a/net-misc/nut/files/upsd.rc6
+++ b/net-misc/nut/files/upsd.rc6
@@ -1,25 +1,23 @@
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd.rc6,v 1.1 2003/10/16 23:26:27 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd.rc6,v 1.2 2003/10/20 10:37:12 robbat2 Exp $
depend() {
need net
+ need upsdrv
before upsmon
}
start() {
ebegin "Starting upsd"
- /sbin/upsdrvctl start
start-stop-daemon --start --quiet --startas /usr/sbin/upsd \
--pidfile=/var/state/nut/upsd.pid
- eend $?
+ eend $? "Failed to start UPSD"
}
stop() {
ebegin "Stopping upsd"
- start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid
- rc=$?
- /sbin/upsdrvctl stop
- eend $rc
+ start-stop-daemon --stop --quiet --pidfile=/var/lib/nut/upsd.pid
+ eend $? "Failed to stop UPSD!"
}
diff --git a/net-misc/nut/files/upsdrv.rc6 b/net-misc/nut/files/upsdrv.rc6
new file mode 100644
index 000000000000..cc47166153b8
--- /dev/null
+++ b/net-misc/nut/files/upsdrv.rc6
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsdrv.rc6,v 1.1 2003/10/20 10:37:12 robbat2 Exp $
+
+depend() {
+ need net
+ before upsd
+}
+
+controlprog="/usr/lib/nut/upsdrvctl"
+
+start() {
+ ebegin "Starting UPS drivers"
+ ${controlprog} start
+ rc=$?
+ eend $rc "Failed to start UPS drivers!"
+}
+
+stop() {
+ ebegin "Stopping UPS drivers"
+ ${controlprog} stop
+ rc=$?
+ eend $rc "Failed to stop UPS drivers!"
+}
diff --git a/net-misc/nut/files/upsmon.rc6 b/net-misc/nut/files/upsmon.rc6
index cdcf346141a4..bce0ef3ba1a1 100644
--- a/net-misc/nut/files/upsmon.rc6
+++ b/net-misc/nut/files/upsmon.rc6
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsmon.rc6,v 1.1 2003/10/16 23:26:27 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsmon.rc6,v 1.2 2003/10/20 10:37:12 robbat2 Exp $
depend() {
need net
@@ -9,17 +9,13 @@ depend() {
}
start() {
- ebegin "Starting upsd"
- /sbin/upsdrvctl start
- start-stop-daemon --start --quiet --startas /usr/sbin/upsd \
- --pidfile=/var/state/nut/upsd.pid
+ ebegin "Starting upsmon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/upsmon
eend $?
}
stop() {
- ebegin "Stopping upsd"
- start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid
- rc=$?
- /sbin/upsdrvctl stop
- eend $rc
+ ebegin "Stopping upsmon"
+ start-stop-daemon --stop --quiet --pidfile=/var/lib/nut/upsmon.pid
+ eend $?
}
diff --git a/net-misc/nut/nut-1.4.0-r2.ebuild b/net-misc/nut/nut-1.4.0-r2.ebuild
new file mode 100644
index 000000000000..7e7a100ec7bd
--- /dev/null
+++ b/net-misc/nut/nut-1.4.0-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-1.4.0-r2.ebuild,v 1.1 2003/10/20 10:37:12 robbat2 Exp $
+
+DESCRIPTION="Network-UPS Tools."
+SRC_URI="http://www.exploits.org/nut/release/${PV%.*}/${P}.tar.gz"
+HOMEPAGE="http://www.exploits.org/nut/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc"
+IUSE="cgi"
+
+DEPEND=">=sys-apps/sed-4
+ cgi? ( =media-libs/libgd-1* )"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+ -i configure.in || die "sed failed"
+}
+
+src_compile() {
+ local myconf
+ myconf="${myconf} `use_with cgi` `use_with cgi cgipath /usr/share/nut`"
+
+ WANT_AUTOCONF_2_5=1 autoconf
+ econf \
+ --with-user=nut \
+ --with-group=nut \
+ --with-drvpath=/usr/lib/nut \
+ --sysconfdir=/etc/nut \
+ --with-logfacility=LOG_DAEMON \
+ --with-statepath=/var/lib/nut \
+ --with-linux-hiddev \
+ ${myconf}
+
+ sed -e "s:= bestups:= hidups bestups:" \
+ -i drivers/Makefile || die "sed failed"
+ sed -e "s:= powercom.8:= hidups.8 powercom.8:" \
+ -i man/Makefile || "sed failed"
+
+ emake || die "compile problem"
+
+ if [ "`use cgi`" ] ; then
+ emake cgi || die "compile cgi problem"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ keepdir /var/lib/nut
+
+ for i in "${D}"/etc/nut/*.sample ; do
+ mv "${i}" "${i/.sample/}"
+ done
+
+ if [ "`use cgi`" ] ; then
+ make DESTDIR="${D}" install-cgi || die "make install-cgi failed"
+ einfo "CGI monitoring scripts are installed in /usr/share/nut,"
+ einfo "copy them to your web server's ScriptPath to activate."
+ fi
+
+ dodoc CHANGES COPYING CREDITS INSTALL MAINTAINERS NEWS README UPGRADING \
+ docs/{FAQ,*.txt,driver.list}
+
+ docinto cables
+ dodoc docs/cables/*
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/upsd.rc6 upsd
+ newexe ${FILESDIR}/upsdrv.rc6 upsdrv
+ newexe ${FILESDIR}/upsmon.rc6 upsmon
+}
+
+pkg_postinst() {
+ chown nut:nut ${ROOT}/var/lib/nut
+ chmod 0700 ${ROOT}/var/lib/nut
+ chown root:nut ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf}
+ chmod 0640 ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf}
+}
diff --git a/net-misc/nut/nut-1.5.6-r1.ebuild b/net-misc/nut/nut-1.5.6-r1.ebuild
new file mode 100644
index 000000000000..591d6c55fa84
--- /dev/null
+++ b/net-misc/nut/nut-1.5.6-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-1.5.6-r1.ebuild,v 1.1 2003/10/20 10:37:12 robbat2 Exp $
+
+DESCRIPTION="Network-UPS Tools."
+SRC_URI="http://www.exploits.org/nut/development/${PV%.*}/${P}.tar.gz"
+HOMEPAGE="http://www.exploits.org/nut/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc"
+IUSE="cgi"
+
+DEPEND=">=sys-apps/sed-4
+ cgi? ( =media-libs/libgd-1* )"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+ -i configure.in || die "sed failed"
+}
+
+src_compile() {
+ local myconf
+ myconf="${myconf} `use_with cgi` `use_with cgi cgipath /usr/share/nut`"
+
+ WANT_AUTOCONF_2_5=1 autoconf
+ econf \
+ --with-user=nut \
+ --with-group=nut \
+ --with-drvpath=/usr/lib/nut \
+ --sysconfdir=/etc/nut \
+ --with-logfacility=LOG_DAEMON \
+ --with-statepath=/var/lib/nut \
+ --with-linux-hiddev \
+ ${myconf}
+
+ sed -e "s:= bestups:= hidups bestups:" \
+ -i drivers/Makefile || die "sed failed"
+ sed -e "s:= powercom.8:= hidups.8 powercom.8:" \
+ -i man/Makefile || "sed failed"
+
+ emake || die "compile problem"
+
+ if [ "`use cgi`" ] ; then
+ emake cgi || die "compile cgi problem"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ keepdir /var/lib/nut
+
+ for i in "${D}"/etc/nut/*.sample ; do
+ mv "${i}" "${i/.sample/}"
+ done
+
+ if [ "`use cgi`" ] ; then
+ make DESTDIR="${D}" install-cgi || die "make install-cgi failed"
+ einfo "CGI monitoring scripts are installed in /usr/share/nut,"
+ einfo "copy them to your web server's ScriptPath to activate."
+ fi
+
+ dodoc CHANGES COPYING CREDITS INSTALL MAINTAINERS NEWS README UPGRADING \
+ docs/{FAQ,*.txt,driver.list}
+
+ docinto cables
+ dodoc docs/cables/*
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/upsd.rc6 upsd
+ newexe ${FILESDIR}/upsdrv.rc6 upsdrv
+ newexe ${FILESDIR}/upsmon.rc6 upsmon
+}
+
+pkg_postinst() {
+ chown nut:nut ${ROOT}/var/lib/nut
+ chmod 0700 ${ROOT}/var/lib/nut
+ chown root:nut ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf}
+ chmod 0640 ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf}
+}