summaryrefslogtreecommitdiff
path: root/libre/xbmc-libre/xbmc.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-05-26 12:40:11 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-05-26 12:40:11 -0300
commitcb607eaf6eb23ddc950c26a11b1fc581c2250339 (patch)
tree03d6d650d6f0dee366cd870e8bacc98beaa4e706 /libre/xbmc-libre/xbmc.install
parent200076f2bb86ebe7a541a71946d7723d52f10292 (diff)
downloadabslibre-cb607eaf6eb23ddc950c26a11b1fc581c2250339.tar.gz
abslibre-cb607eaf6eb23ddc950c26a11b1fc581c2250339.tar.bz2
abslibre-cb607eaf6eb23ddc950c26a11b1fc581c2250339.zip
xbmc-libre-13.0-5: updating revision from Arch
* cleaned and improved pkgbuild * updated install script for 420 uid/gid FIXES: FS#40247 (https://bugs.archlinux.org/task/40247) - [xbmc] optional dependency description for upower is wrong FS#40422 (https://bugs.archlinux.org/task/40422) - [xbmc] /user in PKGBUILD instead of /usr in package() FS#40539 (https://bugs.archlinux.org/task/40539) - [xbmc] .desktop entry has executable attributes
Diffstat (limited to 'libre/xbmc-libre/xbmc.install')
-rw-r--r--libre/xbmc-libre/xbmc.install29
1 files changed, 19 insertions, 10 deletions
diff --git a/libre/xbmc-libre/xbmc.install b/libre/xbmc-libre/xbmc.install
index 8076fe2d3..6e477d103 100644
--- a/libre/xbmc-libre/xbmc.install
+++ b/libre/xbmc-libre/xbmc.install
@@ -1,19 +1,28 @@
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 -r xbmc
- getent passwd xbmc > /dev/null || useradd -r -m -d /var/lib/xbmc -g xbmc xbmc
- usermod -a -G xbmc,audio,video,network,optical xbmc
- mkdir -p var/lib/xbmc
- chown -R xbmc:xbmc var/lib/xbmc
+ update_icons
+ getent group xbmc > /dev/null || groupadd -g 420 xbmc
+ getent passwd xbmc > /dev/null || useradd -c 'XBMC user' -u 420 -g xbmc -G audio,video,network,optical -d /var/lib/xbmc -s /sbin/nologin xbmc
+ passwd -l xbmc > /dev/null
}
post_upgrade() {
post_install $1
+ if ! getent group xbmc | cut -d: -f3 | grep 420 > /dev/null 2>&1; then
+ groupmod -g 420 xbmc
+ fi
+ if ! id -u xbmc | grep 420 > /dev/null 2>&1; then
+ usermod -u 420 xbmc
+ chown -R xbmc:xbmc /var/lib/xbmc
+ fi
}
post_remove() {
- [[ $(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
+ update_icons
+ getent passwd xbmc > /dev/null 2>&1 && userdel xbmc
+ getent group xbmc > /dev/null 2>&1 && groupdel xbmc
+}
+
+update_icons() {
+ type -p gtk-update-icon-cache > /dev/null 2>&1 && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
+ type -p update-desktop-database > /dev/null 2>&1 && usr/bin/update-desktop-database -q usr/share/applications
}