diff options
author | root <root@rshg054.dnsready.net> | 2013-09-10 01:37:49 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-09-10 01:37:49 -0700 |
commit | f5039428394b8715a685c006ab4c7421f45d0aff (patch) | |
tree | f5330d39e85a451f7ebfdc2ebbaac0b011c77a7b /community/lxdm/lxdm.install | |
parent | 25f164e4d715807385e621f21bf1715d64d925a8 (diff) |
Tue Sep 10 01:36:04 PDT 2013
Diffstat (limited to 'community/lxdm/lxdm.install')
-rw-r--r-- | community/lxdm/lxdm.install | 23 |
1 files changed, 9 insertions, 14 deletions
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 } |