#!/bin/sh

PATH=$PATH:/usr/bin

case "$1" in
suspend)
   if [ "`/usr/sbin/hciconfig`" != "" ]; then
      hcitool dc `hcitool con | awk '/ACL/ {print $3}'`
      hciconfig hci0 down
   fi 
;;
resume)
   if [ "`/usr/sbin/hciconfig`" != "" ]; then
      killall hciattach
      cardctl eject 0
      cardctl insert 0
#       /etc/pcmcia/bluetooth resart
   fi
esac
