summaryrefslogtreecommitdiffstats
path: root/source/ap/pm-utils/49bluetooth-generic
blob: 1c88f198d8e8cb37fae0f0bbf0f06456e6c8b8d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

. "${PM_FUNCTIONS}"

case "$1" in
  hibernate|suspend)
    if [ -d /sys/devices/virtual/misc/rfkill -a -x /usr/sbin/rfkill -a -x /etc/rc.d/rc.bluetooth ]; then
      rfkill block bluetooth
    fi
   ;;
  thaw|resume)
    if [ -d /sys/devices/virtual/misc/rfkill -a -x /usr/sbin/rfkill -a -x /etc/rc.d/rc.bluetooth ]; then
      rfkill unblock bluetooth
    fi
    ;;
  *)
    ;;
esac