From d81def80b00a3dbcb4f8980f4503c4d659b48a2a Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 23 Nov 2007 12:04:11 +0000 Subject: 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) --- init.d.BSD/powerd | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'init.d.BSD/powerd') 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 } -- cgit v1.2.3