[Pm-utils] [PATCH 14/17] Minor quotation updates in on_ac_power
Victor Lowther
victor.lowther at gmail.com
Sat Feb 9 18:31:18 PST 2008
---
src/on_ac_power | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/on_ac_power b/src/on_ac_power
index 6f6a3d0..edddf72 100755
--- a/src/on_ac_power
+++ b/src/on_ac_power
@@ -31,7 +31,7 @@
#
# Check for AC/DC/etc adapters
-ac_adapters=$(hal-find-by-capability --capability ac_adapter)
+ac_adapters="$(hal-find-by-capability --capability ac_adapter)"
# If there are no AC adapters, it is most likely a desktop.
# Assume online, since we have no data.
@@ -39,8 +39,8 @@ ac_adapters=$(hal-find-by-capability --capability ac_adapter)
# If any of them are online, then we're done.
for device in $ac_adapters ; do
- present=$(hal-get-property --udi "$device" --key ac_adapter.present)
- [ "x$present" = "xtrue" ] && exit 0
+ present="$(hal-get-property --udi "$device" --key ac_adapter.present)"
+ [ "$present" = "true" ] && exit 0
done
# If there are adapters, but none are online, we're not on AC.
--
1.5.3.8
More information about the Pm-utils
mailing list