diff options
author | njl <njl@FreeBSD.org> | 2003-07-25 17:11:15 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2003-07-25 17:11:15 +0000 |
commit | ea4a3f488d2961c1949f4b85f35a051ad9b78e3a (patch) | |
tree | de281abdbe5415d8ba9cae34a34fe8fa9e4ed69c /usr.sbin/zzz/zzz.sh | |
parent | 07991e4a4b972b292618b1b80aef0bd7ea9c6da4 (diff) | |
download | FreeBSD-src-ea4a3f488d2961c1949f4b85f35a051ad9b78e3a.zip FreeBSD-src-ea4a3f488d2961c1949f4b85f35a051ad9b78e3a.tar.gz |
Fix output from an error message.
Use sysctl -n instead of sed
Submitted by: Scott Lambert <lambert@lambertfam.org>
Diffstat (limited to 'usr.sbin/zzz/zzz.sh')
-rw-r--r-- | usr.sbin/zzz/zzz.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh index 7708153..ef9527b 100644 --- a/usr.sbin/zzz/zzz.sh +++ b/usr.sbin/zzz/zzz.sh @@ -18,19 +18,19 @@ APM_SUSPEND_DELAY=machdep.apm_suspend_delay # Check for ACPI support if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then # Get configured suspend state - SUSPEND_STATE=`sysctl $ACPI_SUSPEND_STATE | sed 's|^.*: S||'` + SUSPEND_STATE=`sysctl -n $ACPI_SUSPEND_STATE ` # Get list of supported suspend states - SUPPORTED_STATES=`sysctl $ACPI_SUPPORTED_STATES | sed 's|^.*: ||'` + SUPPORTED_STATES=`sysctl -n $ACPI_SUPPORTED_STATES ` # Check if the configured suspend state is supported by the system - if echo $SUPPORTED_STATES | grep S$SUSPEND_STATE >/dev/null; then + if echo $SUPPORTED_STATES | grep $SUSPEND_STATE >/dev/null; then # execute ACPI style suspend command exec acpiconf -s $SUSPEND_STATE else - echo -n "Requested suspend state S$ACPI_SUSPEND_STATE " + echo -n "Requested suspend state $SUSPEND_STATE " echo -n "is not supported. " - echo "Supported states: $ACPI_SUPPORTED_STATES" + echo "Supported states: $SUPPORTED_STATES" fi # Check for APM support elif sysctl $APM_SUSPEND_DELAY >/dev/null 2>&1; then |