From d63908059aa28af0f4f22d46f41cad7fa65e3ec2 Mon Sep 17 00:00:00 2001 From: njl Date: Fri, 25 Feb 2005 23:14:41 +0000 Subject: Quiet error messages if the requested sysctls are not present. MFC after: 1 day --- etc/rc.d/power_profile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'etc') 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 -- cgit v1.1