Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-power/apcupsd/files: apcupsd.init.2
Date: Thu, 15 Jan 2009 15:21:13
Message-Id: E1LNU1v-0006xQ-HG@stork.gentoo.org
1 flameeyes 09/01/15 15:21:11
2
3 Added: apcupsd.init.2
4 Log:
5 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).
6 (Portage version: 2.2_rc22/cvs/Linux 2.6.28-gentoo x86_64)
7
8 Revision Changes Path
9 1.1 sys-power/apcupsd/files/apcupsd.init.2
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/files/apcupsd.init.2?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/files/apcupsd.init.2?rev=1.1&content-type=text/plain
13
14 Index: apcupsd.init.2
15 ===================================================================
16 #!/sbin/runscript
17 # Copyright 2007 Gentoo Foundation
18 # Distributed under the terms of the GNU General Public License v2
19 # $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/files/apcupsd.init.2,v 1.1 2009/01/15 15:21:11 flameeyes Exp $
20
21 INSTANCE="${SVCNAME#*.}"
22 if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "apcupsd" ]; then
23 INSTANCE="apcupsd"
24 fi
25
26 depend() {
27 use net
28 }
29
30 start() {
31 rm -f /etc/apcupsd/powerfail
32
33 export SERVICE="${SVCNAME}"
34
35 ebegin "Starting APC UPS daemon"
36 start-stop-daemon \
37 --start --pidfile "/var/run/${SVCNAME}.pid" \
38 --exec /sbin/apcupsd -- \
39 -f "/etc/apcupsd/${INSTANCE}.conf" \
40 -P "/var/run/${SVCNAME}.pid"
41 eend $?
42 }
43
44 stop() {
45 ebegin "Stopping APC UPS daemon"
46 start-stop-daemon \
47 --stop --pidfile "/var/run/${SVCNAME}.pid" \
48 --retry TERM/5/TERM/5 \
49 --exec /sbin/apcupsd
50 eend $?
51 }