summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/powerd
blob: 84a260fdb3f4c3ad6b7e1be004f72ee81f4fcfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: powerd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: nojail shutdown

. /etc/rc.subr

name="powerd"
rcvar="powerd_enable"
command="/usr/sbin/${name}"
stop_postcmd=powerd_poststop

powerd_poststop()
{
	sysctl dev.cpu.0.freq=`sysctl -n dev.cpu.0.freq_levels |
	    sed -e 's:/.*::'` > /dev/null
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud