summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-25 23:14:41 +0000
committernjl <njl@FreeBSD.org>2005-02-25 23:14:41 +0000
commitd63908059aa28af0f4f22d46f41cad7fa65e3ec2 (patch)
tree7fcaa32a360681795d608bd282bd1f5a95ad70d1 /etc
parentacdfb6c892f23d4a31cd699a5bb9854ae65c0f45 (diff)
downloadFreeBSD-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')
-rw-r--r--etc/rc.d/power_profile12
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
OpenPOWER on IntegriCloud