summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/powerd
blob: fe7237e5bd3ff33fbc6a6eb2014c87f339f7739a (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

. /etc/rc.subr

name="powerd"
rcvar=`set_rcvar`
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