From f5039428394b8715a685c006ab4c7421f45d0aff Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Sep 2013 01:37:49 -0700 Subject: Tue Sep 10 01:36:04 PDT 2013 --- community/lxdm/lxdm.install | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'community/lxdm/lxdm.install') diff --git a/community/lxdm/lxdm.install b/community/lxdm/lxdm.install index 3bbb59a2e..a8bc882dc 100644 --- a/community/lxdm/lxdm.install +++ b/community/lxdm/lxdm.install @@ -1,22 +1,17 @@ post_install() { - getent group lxdm >/dev/null && groupmod -g 121 lxdm || groupadd -g 121 lxdm - getent passwd lxdm >/dev/null && usermod -u 121 -g 121 lxdm || useradd -r -d /var/lib/lxdm -u 121 -g 121 lxdm - chown -R 121:121 /var/lib/lxdm - chgrp 121 /etc/lxdm/lxdm.conf - chmod +r /etc/lxdm/lxdm.conf - systemd-tmpfiles --create lxdm.conf + getent group lxdm > /dev/null 2>&1 && \ + groupmod -g 121 lxdm > /dev/null 2>&1 || \ + groupadd -g 121 lxdm + getent passwd lxdm > /dev/null 2>&1 && \ + usermod -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm > /dev/null 2>&1 || \ + useradd -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm + passwd -l lxdm > /dev/null } post_upgrade() { - post_install $1 - if [[ $(vercmp $2 0.4.1-22) < 0 ]]; then - groupmod -g 121 lxdm - usermod -g 121 -u 121 lxdm - fi + post_install } post_remove() { - userdel -f lxdm - groupdel lxdm - true + getent passwd lxdm > /dev/null 2>&1 && userdel lxdm } -- cgit v1.2.3-54-g00ecf