diff --git a/alarm/xbmc-rbp-git/PKGBUILD b/alarm/xbmc-rbp-git/PKGBUILD index 2a5f0f0cf..d502716fe 100644 --- a/alarm/xbmc-rbp-git/PKGBUILD +++ b/alarm/xbmc-rbp-git/PKGBUILD @@ -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 } diff --git a/alarm/xbmc-rbp-git/polkit.rules b/alarm/xbmc-rbp-git/polkit.rules new file mode 100644 index 000000000..2ed55f3d3 --- /dev/null +++ b/alarm/xbmc-rbp-git/polkit.rules @@ -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; + } +}); diff --git a/alarm/xbmc-rbp-git/xbmc.service b/alarm/xbmc-rbp-git/xbmc.service index c7e929c13..afc62f1f0 100644 --- a/alarm/xbmc-rbp-git/xbmc.service +++ b/alarm/xbmc-rbp-git/xbmc.service @@ -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]