diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-01-15 15:21:11 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-01-15 15:21:11 +0000 |
commit | 6a2368f85808efcc9fce7f2117dd2d89990877f3 (patch) | |
tree | a9c2d718a82d923044bf247491ba9ac0ff1e9b99 /sys-power/apcupsd/files | |
parent | Removed 2 obsolete patches (diff) | |
download | historical-6a2368f85808efcc9fce7f2117dd2d89990877f3.tar.gz historical-6a2368f85808efcc9fce7f2117dd2d89990877f3.tar.bz2 historical-6a2368f85808efcc9fce7f2117dd2d89990877f3.zip |
Version bump, finally closing bug #228011 (thanks to all for the patience). Also fix bug #240694 (thanks to Billy DeVincentis for the init script), #254242 (thanks to Gordon Pritchard for reporting), #243070 (thanks to Ryan Tandy for the patch).
Package-Manager: portage-2.2_rc22/cvs/Linux 2.6.28-gentoo x86_64
Diffstat (limited to 'sys-power/apcupsd/files')
-rw-r--r-- | sys-power/apcupsd/files/apcupsd.init.2 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys-power/apcupsd/files/apcupsd.init.2 b/sys-power/apcupsd/files/apcupsd.init.2 new file mode 100644 index 000000000000..43868f75ddaf --- /dev/null +++ b/sys-power/apcupsd/files/apcupsd.init.2 @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/files/apcupsd.init.2,v 1.1 2009/01/15 15:21:11 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 $? +} + |