summaryrefslogtreecommitdiff
path: root/pm/sleep.d
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-01-28 20:48:56 +0000
committerRichard Hughes <richard@hughsie.com>2008-01-28 20:48:56 +0000
commit6721d29724b62be596e56db9026e1c27c112819d (patch)
tree0577cfa0aa2ffea63704e9684276799354a3438b /pm/sleep.d
parent9f6e1f5911168ce032e04f7a0f9ddc5ed67495bb (diff)
If there is no state to save when running the ibm bluetooth hook, then
don't do anything instead of saving state that says there was no state to save.
Diffstat (limited to 'pm/sleep.d')
-rwxr-xr-xpm/sleep.d/49bluetooth9
1 files changed, 3 insertions, 6 deletions
diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth
index 26a6de5..57ed8ee 100755
--- a/pm/sleep.d/49bluetooth
+++ b/pm/sleep.d/49bluetooth
@@ -4,12 +4,9 @@
suspend_bluetooth()
{
- if [ -f /proc/acpi/ibm/bluetooth ]; then
- savestate ibm_bluetooth $(awk '{ print $2 ; exit; }' /proc/acpi/ibm/bluetooth)
- echo disable > /proc/acpi/ibm/bluetooth
- else
- savestate ibm_bluetooth missing
- fi
+ [ -f /proc/acpi/ibm/bluetooth ] || return 1
+ savestate ibm_bluetooth "$(awk '{ print $2 ; exit; }' /proc/acpi/ibm/bluetooth)"
+ echo disable > /proc/acpi/ibm/bluetooth
}
resume_bluetooth()