diff options
author | njl <njl@FreeBSD.org> | 2005-02-25 23:14:41 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-02-25 23:14:41 +0000 |
commit | d63908059aa28af0f4f22d46f41cad7fa65e3ec2 (patch) | |
tree | 7fcaa32a360681795d608bd282bd1f5a95ad70d1 /etc/rc.d/power_profile | |
parent | acdfb6c892f23d4a31cd699a5bb9854ae65c0f45 (diff) | |
download | FreeBSD-src-d63908059aa28af0f4f22d46f41cad7fa65e3ec2.zip FreeBSD-src-d63908059aa28af0f4f22d46f41cad7fa65e3ec2.tar.gz |
Quiet error messages if the requested sysctls are not present.
MFC after: 1 day
Diffstat (limited to 'etc/rc.d/power_profile')
-rw-r--r-- | etc/rc.d/power_profile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/rc.d/power_profile b/etc/rc.d/power_profile index dac4b1e..bf2648c 100644 --- a/etc/rc.d/power_profile +++ b/etc/rc.d/power_profile @@ -72,16 +72,16 @@ esac # Set the various sysctls based on the profile's values. node="hw.acpi.cpu.cx_lowest" highest_value="C1" -lowest_value="$(sysctl -n hw.acpi.cpu.cx_supported | \ - awk '{ print "C" split($0, a) }' - 2> /dev/null)" +lowest_value="`(sysctl -n hw.acpi.cpu.cx_supported | \ + awk '{ print "C" split($0, a) }' -) 2> /dev/null`" eval value=\$${profile}_cx_lowest sysctl_set node="dev.cpu.0.freq" -highest_value="$(sysctl -n dev.cpu.0.freq_levels | \ - awk '{ split($0, a, "[/ ]"); print a[1] }' - 2> /dev/null)" -lowest_value="$(sysctl -n dev.cpu.0.freq_levels | \ - awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' - 2> /dev/null)" +highest_value="`(sysctl -n dev.cpu.0.freq_levels | \ + awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`" +lowest_value="`(sysctl -n dev.cpu.0.freq_levels | \ + awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' -) 2> /dev/null`" eval value=\$${profile}_cpu_freq sysctl_set |