blob: 03112d3535c1092b7c954ac2e72d6ac147055bc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/sbin/runscript
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/powerd.initd,v 1.2 2006/10/03 14:43:39 uberlord Exp $
depend() {
need localmount
}
start() {
local args=
[[ -n ${BATTERY_MODE} ]] && args="${args} -b ${BATTERY_MODE}"
[[ -n ${AC_MODE} ]] && args="${args} -a ${AC_MODE}"
ebegin $"Starting Power Control Daemon"
start-stop-daemon --start --exec /usr/sbin/powerd \
--pidfile /var/run/powerd.pid \
-- ${args} ${POWERD_OPTS}
eend $? $"Failed to start powerd"
}
stop() {
ebegin $"Stopping Power Control Daemon"
start-stop-daemon --stop --exec /usr/sbin/powerd \
--pidfile /var/run/powerd.pid
eend $? $"Failed to stop powerd"
}
|