Menu

[r10367]: / legacy / etc / rc.d / powerd  Maximize  Restore  History

Download this file

30 lines (24 with data), 553 Bytes

#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/powerd,v 1.4.2.1.2.1 2009/04/15 03:14:26 kensmith Exp $
#
# Modified by Volker Theile (votdev@gmx.de)
#

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

. /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.