summaryrefslogtreecommitdiff
path: root/community/lxdm/lxdm.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/lxdm/lxdm.install')
-rw-r--r--community/lxdm/lxdm.install18
1 files changed, 12 insertions, 6 deletions
diff --git a/community/lxdm/lxdm.install b/community/lxdm/lxdm.install
index 24edd91a4..eaf2339cd 100644
--- a/community/lxdm/lxdm.install
+++ b/community/lxdm/lxdm.install
@@ -1,10 +1,11 @@
pkgname=lxdm
post_install() {
- getent group lxdm > /dev/null 2>&1 || groupadd -g 121 lxdm
- getent passwd lxdm > /dev/null 2>&1 || useradd -c 'LXDE Display Manager' -u 121 -g lxdm -d /var/lib/lxdm -s /sbin/nologin lxdm
- passwd -l lxdm > /dev/null
- chown -R lxdm:lxdm /var/lib/lxdm > /dev/null
+ if [ -z "`getent group "lxdm" 2> /dev/null`" ]; then
+ groupadd lxdm
+ chown root:lxdm /etc/lxdm/lxdm.conf
+ fi
+ chown -R root:lxdm /var/lib/lxdm > /dev/null
chmod +r /etc/lxdm/lxdm.conf
}
@@ -13,6 +14,11 @@ post_upgrade() {
}
post_remove() {
- getent passwd lxdm > /dev/null 2>&1 && userdel lxdm
- getent group lxdm > /dev/null 2>&1 && groupdel lxdm
+ getent group "lxdm" &>/dev/null && groupdel lxdm #1>/dev/null
+ return 0
}
+
+op=$1
+shift
+
+$op "$@"