2005-02-26 21:18:54 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: powerd
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: LOGIN
|
2008-07-16 19:50:29 +00:00
|
|
|
# KEYWORD: nojail shutdown
|
2005-02-26 21:18:54 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="powerd"
|
2016-04-23 16:10:54 +00:00
|
|
|
desc="Modify the power profile based on AC line state"
|
2012-01-14 02:18:41 +00:00
|
|
|
rcvar="powerd_enable"
|
2005-10-28 16:55:38 +00:00
|
|
|
command="/usr/sbin/${name}"
|
2006-08-27 11:04:39 +00:00
|
|
|
stop_postcmd=powerd_poststop
|
|
|
|
|
|
|
|
powerd_poststop()
|
|
|
|
{
|
|
|
|
sysctl dev.cpu.0.freq=`sysctl -n dev.cpu.0.freq_levels |
|
|
|
|
sed -e 's:/.*::'` > /dev/null
|
|
|
|
}
|
2005-02-26 21:18:54 +00:00
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|