summaryrefslogtreecommitdiffstats
path: root/etc/inc/system.inc
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2012-04-13 13:27:16 -0700
committerJim P <jim@pingle.org>2012-04-13 13:27:16 -0700
commit9583759704e4af48e52ed4309780fdf759f4872d (patch)
tree0b69392761bb9413bd98d487edc8461fadcad7cc /etc/inc/system.inc
parentd46c3acd20608169bc577c81806064499db3f946 (diff)
parent53c210dd6451f1bb82347e37c89652f7818122aa (diff)
downloadpfsense-9583759704e4af48e52ed4309780fdf759f4872d.zip
pfsense-9583759704e4af48e52ed4309780fdf759f4872d.tar.gz
Merge pull request #90 from vizvayu/master
Mode selection options for PowerD
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r--etc/inc/system.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index d6a43fd..d4cf6ed 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -42,13 +42,15 @@ function activate_powerd() {
global $config, $g;
if ($g['platform'] == 'jail')
return;
+ if(is_process_running("powerd"))
+ exec("/usr/bin/killall powerd");
if(isset($config['system']['powerd_enable'])) {
if ($g["platform"] == "nanobsd")
exec("/sbin/kldload cpufreq");
- exec("/usr/sbin/powerd -b adp -a adp");
- } else {
- if(is_process_running("powerd"))
- exec("/usr/bin/killall powerd");
+ $mode = "hadp";
+ if (!empty($config['system']['powerd_mode']))
+ $mode = $config['system']['powerd_mode'];
+ mwexec("/usr/sbin/powerd -b $mode -a $mode");
}
}
OpenPOWER on IntegriCloud