diff options
author | Timothy Redaelli <drizzt@gentoo.org> | 2007-04-23 12:44:25 +0000 |
---|---|---|
committer | Timothy Redaelli <drizzt@gentoo.org> | 2007-04-23 12:44:25 +0000 |
commit | ea48e2f99b605f595e4dfa0fa358252475394ec3 (patch) | |
tree | 317fb8d48bf8e11e45c1b82488c17ea932f37eed /sys-freebsd/freebsd-usbin/files/powerd.initd | |
parent | In main tree (diff) | |
download | drizzt-ea48e2f99b605f595e4dfa0fa358252475394ec3.tar.gz drizzt-ea48e2f99b605f595e4dfa0fa358252475394ec3.tar.bz2 drizzt-ea48e2f99b605f595e4dfa0fa358252475394ec3.zip |
Add FreeBSD 7.0_pre200704 ebuilds
svn path=/; revision=116
Diffstat (limited to 'sys-freebsd/freebsd-usbin/files/powerd.initd')
-rwxr-xr-x | sys-freebsd/freebsd-usbin/files/powerd.initd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-usbin/files/powerd.initd b/sys-freebsd/freebsd-usbin/files/powerd.initd new file mode 100755 index 0000000..c99adf8 --- /dev/null +++ b/sys-freebsd/freebsd-usbin/files/powerd.initd @@ -0,0 +1,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.3 2007/02/23 14:03:08 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" +} |