|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/lib64/pm-utils/sleep.d/ |
Upload File : |
#!/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