Advertisement
Guest User

/etc/acpi/acpi_oem_exec.sh

a guest
Oct 12th, 2010
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. if [ "$1" = "" -o "$2" = "" ]
  4. then
  5. echo "usage: $0 notify oem_name"
  6. exit 1
  7. fi
  8.  
  9. NOTIFY=`echo $1`
  10. OEM=$2
  11. LOGGER="logger"
  12.  
  13. case ${NOTIFY} in
  14.  
  15. # WLAN an / aus
  16. 0x05)
  17. if [ -e /var/run/wpa_supplicant/wlan0 ]
  18. then
  19. /usr/sbin/wpa_cli terminate
  20. /bin/sleep 2
  21. /sbin/ifconfig wlan0 destroy
  22. MESSAGE="WLAN deactivated"
  23. else
  24. /sbin/ifconfig wlan0 create wlandev wpi0
  25. /bin/sleep 2
  26. /usr/sbin/wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
  27. MESSAGE="WLAN activated"
  28. fi
  29. ;;
  30.  
  31. # Standby
  32. 0x04)
  33. MESSAGE="Standby"
  34. /bin/sync
  35. /bin/sync
  36. /bin/sync
  37. /usr/sbin/zzz
  38. ;;
  39.  
  40. # CD Eject
  41. 0x09)
  42. MESSAGE="Ejecting CD"
  43. /sbin/camcontrol eject cd0
  44. ;;
  45.  
  46. # Sync Disks
  47. 0x0c)
  48. MESSAGE="Syncing disks"
  49. /bin/sync
  50.  
  51. esac
  52.  
  53. ${LOGGER} ${MESSAGE}
  54.  
  55. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement