| Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64 Path : /usr/lib64/pm-utils/sleep.d/ |
| Current File : //usr/lib64/pm-utils/sleep.d/49bluetooth |
#!/bin/sh
# IBM specific hack to disable/enable bluetooth.
# TODO: Doesn't the working USB suspend/resume functionality
# make this code more or less obsolete?
. "${PM_FUNCTIONS}"
[ -f /proc/acpi/ibm/bluetooth ] || exit $NA
suspend_bluetooth()
{
if grep -q enabled /proc/acpi/ibm/bluetooth; then
savestate ibm_bluetooth enable
echo disable > /proc/acpi/ibm/bluetooth
else
savestate ibm_bluetooth disable
fi
}
resume_bluetooth()
{
state_exists ibm_bluetooth || return
restorestate ibm_bluetooth > /proc/acpi/ibm/bluetooth
}
case "$1" in
hibernate|suspend)
suspend_bluetooth
;;
thaw|resume)
resume_bluetooth
;;
*) exit $NA
;;
esac