summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2011-08-29 13:38:55 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2011-08-29 13:38:55 +0000
commitfececdc7746a548e9a6062bfec1ae5572960f628 (patch)
tree52ebbea1f68782d639f48cfd54b33ed27986432f /sys-power/apcupsd
parentVersion bump, bug #380215 (diff)
downloadgentoo-2-fececdc7746a548e9a6062bfec1ae5572960f628.tar.gz
gentoo-2-fececdc7746a548e9a6062bfec1ae5572960f628.tar.bz2
gentoo-2-fececdc7746a548e9a6062bfec1ae5572960f628.zip
Avoid depending on OpenRC for the old versions, .9 will be the one openrc-only, the older ones will have to work with baselayout 1 as well, for people not updating right now.
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'sys-power/apcupsd')
-rw-r--r--sys-power/apcupsd/ChangeLog8
-rw-r--r--sys-power/apcupsd/apcupsd-3.14.7.ebuild5
-rw-r--r--sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild5
-rw-r--r--sys-power/apcupsd/files/apcupsd.init.2a37
4 files changed, 48 insertions, 7 deletions
diff --git a/sys-power/apcupsd/ChangeLog b/sys-power/apcupsd/ChangeLog
index 773751bdcddf..c5951000871e 100644
--- a/sys-power/apcupsd/ChangeLog
+++ b/sys-power/apcupsd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-power/apcupsd
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.73 2011/08/26 10:53:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.74 2011/08/29 13:38:55 flameeyes Exp $
+
+ 29 Aug 2011; Diego E. Pettenò <flameeyes@gentoo.org> apcupsd-3.14.7.ebuild,
+ apcupsd-3.14.8-r1.ebuild, +files/apcupsd.init.2a:
+ Avoid depending on OpenRC for the old versions, .9 will be the one
+ openrc-only, the older ones will have to work with baselayout 1 as well, for
+ people not updating right now.
*apcupsd-3.14.9-r1 (26 Aug 2011)
diff --git a/sys-power/apcupsd/apcupsd-3.14.7.ebuild b/sys-power/apcupsd/apcupsd-3.14.7.ebuild
index f9a46ee943d5..455909daad55 100644
--- a/sys-power/apcupsd/apcupsd-3.14.7.ebuild
+++ b/sys-power/apcupsd/apcupsd-3.14.7.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.7.ebuild,v 1.10 2011/08/26 10:08:01 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.7.ebuild,v 1.11 2011/08/29 13:38:55 flameeyes Exp $
WEBAPP_MANUAL_SLOT="yes"
WEBAPP_OPTIONAL="yes"
@@ -24,7 +24,6 @@ DEPEND="
=dev-libs/glib-2*
>=gnome-base/gconf-2.0 )"
RDEPEND="${DEPEND}
- sys-apps/openrc
virtual/mailx"
pkg_setup() {
@@ -92,7 +91,7 @@ src_install() {
use cgi && webapp_src_install
rm "${D}"/etc/init.d/apcupsd
- newinitd "${FILESDIR}/${PN}.init.2" "${PN}" || die "newinitd failed"
+ newinitd "${FILESDIR}/${PN}.init.2a" "${PN}" || die "newinitd failed"
if has_version sys-apps/openrc; then
newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail || die "newinitd failed"
diff --git a/sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild b/sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild
index be11676f8bc5..f2b4b15f0de9 100644
--- a/sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild
+++ b/sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild,v 1.6 2011/08/26 10:08:01 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.8-r1.ebuild,v 1.7 2011/08/29 13:38:55 flameeyes Exp $
EAPI=3
@@ -23,7 +23,6 @@ DEPEND="
dev-libs/glib:2
>=gnome-base/gconf-2.0 )"
RDEPEND="${DEPEND}
- sys-apps/openrc
virtual/mailx"
CONFIG_CHECK="~USB_HIDDEV ~HIDRAW"
@@ -87,7 +86,7 @@ src_install() {
dohtml -r doc/manual/* || die "dodoc failed"
rm "${D}"/etc/init.d/apcupsd
- newinitd "${FILESDIR}/${PN}.init.2" "${PN}" || die "newinitd failed"
+ newinitd "${FILESDIR}/${PN}.init.2a" "${PN}" || die "newinitd failed"
if has_version sys-apps/openrc; then
newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail || die "newinitd failed"
diff --git a/sys-power/apcupsd/files/apcupsd.init.2a b/sys-power/apcupsd/files/apcupsd.init.2a
new file mode 100644
index 000000000000..f82c9d123649
--- /dev/null
+++ b/sys-power/apcupsd/files/apcupsd.init.2a
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/files/apcupsd.init.2a,v 1.1 2011/08/29 13:38:55 flameeyes Exp $
+
+INSTANCE="${SVCNAME#*.}"
+if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "apcupsd" ]; then
+ INSTANCE="apcupsd"
+fi
+
+depend() {
+ use net
+}
+
+start() {
+ rm -f /etc/apcupsd/powerfail
+
+ export SERVICE="${SVCNAME}"
+
+ ebegin "Starting APC UPS daemon"
+ start-stop-daemon \
+ --start --pidfile "/var/run/${SVCNAME}.pid" \
+ --exec /sbin/apcupsd -- \
+ -f "/etc/apcupsd/${INSTANCE}.conf" \
+ -P "/var/run/${SVCNAME}.pid"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping APC UPS daemon"
+ start-stop-daemon \
+ --stop --pidfile "/var/run/${SVCNAME}.pid" \
+ --retry TERM/5/TERM/5 \
+ --exec /sbin/apcupsd
+ eend $?
+}
+