diff options
author | Cristian Feldman <vizvayu@gmail.com> | 2012-04-10 22:12:30 -0300 |
---|---|---|
committer | Cristian Feldman <vizvayu@gmail.com> | 2012-04-10 22:12:30 -0300 |
commit | 53c210dd6451f1bb82347e37c89652f7818122aa (patch) | |
tree | c18f488e587f6aed14cb65ac30cf0f9614be99ce /etc/inc/system.inc | |
parent | 2fe06a3228848a9714a0488a4468d895f20b7a63 (diff) | |
download | pfsense-53c210dd6451f1bb82347e37c89652f7818122aa.zip pfsense-53c210dd6451f1bb82347e37c89652f7818122aa.tar.gz |
Added mode selection options for PowerD.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index e9f7781..145df52 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"); } } |