From 7b5b9f299e475c3639c096e4be083e8733172785 Mon Sep 17 00:00:00 2001 From: lcapriotti Date: Tue, 19 Jan 2010 14:55:53 +0000 Subject: lirc resume script git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@27012 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- .../chroot_local-includes/etc/pm/sleep.d/99lirc-resume | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tools/XBMCLive/SDK/buildLive/Files/chroot_local-includes/etc/pm/sleep.d/99lirc-resume diff --git a/tools/XBMCLive/SDK/buildLive/Files/chroot_local-includes/etc/pm/sleep.d/99lirc-resume b/tools/XBMCLive/SDK/buildLive/Files/chroot_local-includes/etc/pm/sleep.d/99lirc-resume new file mode 100755 index 0000000000..66a641e3a9 --- /dev/null +++ b/tools/XBMCLive/SDK/buildLive/Files/chroot_local-includes/etc/pm/sleep.d/99lirc-resume @@ -0,0 +1,17 @@ +#!/bin/sh + +# This script will restart lirc drivers, Lirc, and XBMC's lirc interpreter upon resume. + +case "$1" in + resume) + lircDriver=$(dmesg | grep usbcore | grep -i 'lirc' | sed -e "s/.* \(lirc*\)/\1/" | head -n 1) + curl "http://127.0.0.1:8080/xbmcCmds /xbmcHttp?command=ExecBuilt&Inparameter=LIRC.Stop" + /etc/init.d/lirc stop + rmmod $lircDriver + modprobe $lircDriver + /etc/init.d/lirc start + #remove the comment if the computer automatically sleeps after resume + #irw & sleep 1; killall irw + curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=LIRC.Start" + ;; +esac -- cgit v1.2.3