964ba0afd9
This port provides a daemon for adjusting the cpu frequency (using the Enhanced Speedstep module in sysutils/est) based on the current cpu load and power source. PR: ports/71270 Submitted by: Colin Percival <cperciva@daemonology.net>
32 lines
512 B
Bash
32 lines
512 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: estctrl
|
|
# REQUIRE: est
|
|
# KEYWORD: FreeBSD
|
|
|
|
# Define estctrl_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
# /etc/rc.conf.d/est
|
|
#
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
#
|
|
estctrl_enable="NO"
|
|
estctrl_speed_ac="adaptive"
|
|
estctrl_speed_battery="adaptive"
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name="estctrl"
|
|
rcvar=`set_rcvar`
|
|
|
|
load_rc_config $name
|
|
|
|
command="%%PREFIX%%/sbin/estctrl"
|
|
command_args="-a ${estctrl_speed_ac} -b ${estctrl_speed_battery} &"
|
|
|
|
run_rc_command "$1"
|