aboutsummaryrefslogtreecommitdiff
path: root/init.d.BSD/powerd
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-23 12:04:11 +0000
committerRoy Marples <roy@marples.name>2007-11-23 12:04:11 +0000
commitd81def80b00a3dbcb4f8980f4503c4d659b48a2a (patch)
tree64a5df4281620cacbc1f03838d42e88167886fc9 /init.d.BSD/powerd
parentf077f179edaeb746b267421baa29ec751c38b713 (diff)
Move /etc/conf.d/rc to /etc/rc.conf.
Lowercase all configurable variables, non configurations remain uppercase. Replace rc_env_bool with rc_yesno. Split localmount info procfs (Linux) and dumpon, savecore (BSD)
Diffstat (limited to 'init.d.BSD/powerd')
-rw-r--r--init.d.BSD/powerd19
1 files changed, 14 insertions, 5 deletions
diff --git a/init.d.BSD/powerd b/init.d.BSD/powerd
index a97e2e02..c7886942 100644
--- a/init.d.BSD/powerd
+++ b/init.d.BSD/powerd
@@ -25,7 +25,7 @@
# SUCH DAMAGE.
command=/usr/sbin/powerd
-command_args=${POWERD_ARGS}
+command_args=${powerd_args}
pidfile=/var/run/powerd.pid
name="Power Control Daemon"
@@ -36,10 +36,19 @@ depend() {
}
start_pre() {
- if [ -n "${BATTERY_MODE}" ]; then
- command_args="${command_args} -b ${BATTERY_MODE}"
+ if [ -n "${powerd_battery_mode}" ]; then
+ command_args="${command_args} -b ${powerd_battery_mode}"
fi
- if [ -n "${AC_MODE}" ]; then
- command_args="${command_args} -a ${AC_MODE}"
+ if [ -n "${powerd_ac_mode}" ]; then
+ command_args="${command_args} -a ${powerd_ac_mode}"
+ fi
+}
+
+stop_post()
+{
+ local level=$(sysctl -n dev.cpu.0.freq_levels |
+ sed -e 's:/.*::')
+ if [ -n "${level}" ]; then
+ sysctl dev.cpu.0.freq="${level}" >/dev/null
fi
}