Merge pull request #659 from vulpesvelox/lirc_socket

Fix lirc socket and allow xbmc group members to manage power and drives
This commit is contained in:
Oleg Rakhmanov 2013-12-27 08:16:03 -08:00
commit 1b5e1b08e1
3 changed files with 17 additions and 4 deletions

View file

@ -22,8 +22,10 @@ optdepends=(
provides=("xbmc")
conflicts=("xbmc")
install="xbmc.install"
source=('xbmc.service')
md5sums=('36780e43d432c488259d9a899b1bcb28')
source=('xbmc.service'
'polkit.rules')
md5sums=('55e6d3aab86e810c49a7f550be5b7f69'
'db407faa4beb83b6368fc65ba9bc9507')
_gitname="xbmc"
_gitroot="git://github.com/xbmc"
@ -114,5 +116,5 @@ package() {
# systemd stuff
install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service
install -Dm0644 $srcdir/polkit.rules $pkgdir/etc/polkit-1/rules.d/10-xbmc.rules
}

View file

@ -0,0 +1,11 @@
polkit.addRule(function(action, subject) {
if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("xbmc")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks") == 0 && subject.isInGroup("xbmc")) {
return polkit.Result.YES;
}
});

View file

@ -6,7 +6,7 @@ After = remote-fs.target
User = xbmc
Group = xbmc
Type = simple
ExecStart = /usr/bin/xbmc-standalone
ExecStart = /usr/bin/xbmc-standalone -l /run/lirc/lircd
Restart = on-failure
[Install]