[arch-commits] Commit in xbmc/trunk (polkit.rules xbmc.install)
Sergej Pupykin
spupykin at nymeria.archlinux.org
Mon Jan 20 16:40:06 UTC 2014
Date: Monday, January 20, 2014 @ 17:40:06
Author: spupykin
Revision: 104423
FS#38575
Modified:
xbmc/trunk/polkit.rules
xbmc/trunk/xbmc.install
--------------+
polkit.rules | 19 ++++++++++---------
xbmc.install | 11 ++++++-----
2 files changed, 16 insertions(+), 14 deletions(-)
Modified: polkit.rules
===================================================================
--- polkit.rules 2014-01-20 13:27:29 UTC (rev 104422)
+++ polkit.rules 2014-01-20 16:40:06 UTC (rev 104423)
@@ -1,11 +1,12 @@
polkit.addRule(function(action, subject) {
- if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("power")) {
- return polkit.Result.YES;
- }
+ if (subject.user == "xbmc") {
+ polkit.log("action=" + action);
+ polkit.log("subject=" + subject);
+ if (action.id.indexOf("org.freedesktop.login1.") == 0) {
+ return polkit.Result.YES;
+ }
+ if (action.id.indexOf("org.freedesktop.udisks.") == 0) {
+ return polkit.Result.YES;
+ }
+ }
});
-
-polkit.addRule(function(action, subject) {
- if (action.id.indexOf("org.freedesktop.udisks") == 0 && subject.isInGroup("storage")) {
- return polkit.Result.YES;
- }
-});
Modified: xbmc.install
===================================================================
--- xbmc.install 2014-01-20 13:27:29 UTC (rev 104422)
+++ xbmc.install 2014-01-20 16:40:06 UTC (rev 104423)
@@ -1,10 +1,10 @@
post_install() {
[[ $(type -p gtk-update-icon-cache) ]] && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
[[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
- getent group xbmc > /dev/null || groupadd xbmc
- getent passwd xbmc > /dev/null || useradd -m -d /var/lib/xbmc -g xbmc xbmc
+ getent group xbmc > /dev/null || groupadd -r xbmc
+ getent passwd xbmc > /dev/null || useradd -r -m -d /var/lib/xbmc -g xbmc xbmc
usermod -a -G xbmc,audio,video,power,network,optical,storage,disk xbmc
- chown -R 102:0 etc/polkit-1
+ chown -R xbmc:xbmc var/lib/xbmc
}
post_upgrade() {
@@ -12,6 +12,7 @@
}
post_remove() {
- post_install $1
- echo "You may want to remove xbmc user and group"
+ [[ $(type -p gtk-update-icon-cache) ]] && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
+ [[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
+ getent passwd xbmc > /dev/null || userdel xbmc
}
More information about the arch-commits
mailing list