Menu

[r2016]: / trunk / etc / rc.d / powerd  Maximize  Restore  History

Download this file

27 lines (20 with data), 451 Bytes

#!/bin/sh

# PROVIDE: powerd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: nojail
# XQUERY: -i "count(//system/powerd) > 0" -o "0" -b
# RCVAR: powerd

powerd_enable=${powerd_enable:-"NO"}

. /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"
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.