aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2005-02-25 23:14:41 +0000
committerNate Lawson <njl@FreeBSD.org>2005-02-25 23:14:41 +0000
commit4fbce3b11cdc0971044286424fc3f0a8e3d92b66 (patch)
tree7fcaa32a360681795d608bd282bd1f5a95ad70d1 /etc
parent937003c8b0d3a9042a06fdf22ce37dcd35ed6019 (diff)
downloadsrc-4fbce3b11cdc0971044286424fc3f0a8e3d92b66.tar.gz
src-4fbce3b11cdc0971044286424fc3f0a8e3d92b66.zip
Quiet error messages if the requested sysctls are not present.
MFC after: 1 day
Notes
Notes: svn path=/head/; revision=142523
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 dac4b1e34529..bf2648ce7b57 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