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