summarylogtreecommitdiffstats
path: root/lightdm.install
diff options
context:
space:
mode:
Diffstat (limited to 'lightdm.install')
-rw-r--r--lightdm.install73
1 files changed, 9 insertions, 64 deletions
diff --git a/lightdm.install b/lightdm.install
index ce36d4b2713..c130f4771cc 100644
--- a/lightdm.install
+++ b/lightdm.install
@@ -1,72 +1,17 @@
-# The UID and GID for the lightdm package in [community] is 620 (for whatever
-# reason), so we'll keep that
-
post_install() {
- if ! getent group lightdm >/dev/null; then
- groupadd -g 620 lightdm
- fi
-
- if ! getent passwd lightdm >/dev/null; then
- useradd -u 620 -c "Light Display Manager" -g lightdm -d /var/lib/lightdm -s /sbin/nologin lightdm
- fi
-
- if ! getent group nopasswdlogin >/dev/null; then
- groupadd --system nopasswdlogin
- fi
-
- if [ ! -d /var/lib/lightdm ]; then
- mkdir -p /var/lib/lightdm
- fi
-
- chown -R lightdm:lightdm /var/lib/lightdm
- chmod -R 0750 /var/lib/lightdm
-
- systemd-tmpfiles --create /usr/lib/tmpfiles.d/lightdm.conf
-}
-
-post_upgrade() {
- if getent group lightdm >/dev/null; then
- if [ "x$(id -g lightdm 2>/dev/null)" != "x620" ]; then
- userdel lightdm &>/dev/null || :
- groupdel lightdm &>/dev/null || :
- groupadd -g 620 lightdm
+ if ! getent group lightdm &>/dev/null; then
+ groupadd -g 620 lightdm
fi
- fi
- if ! getent passwd lightdm >/dev/null; then
- if [ "x$(id -u lightdm 2>/dev/null)" != "x620" ]; then
- userdel lightdm &>/dev/null || :
- useradd -u 620 -c "Light Display Manager" -g lightdm -d /var/lib/lightdm -s /sbin/nologin lightdm
+ if ! getent passwd lightdm &>/dev/null; then
+ useradd -c 'Light Display Manager' -u 620 -g lightdm -d /var/lib/lightdm -s /usr/bin/nologin lightdm
fi
- fi
-
- chown -R lightdm:lightdm /var/lib/lightdm
- chmod -R 0750 /var/lib/lightdm
-}
-
-post_remove() {
- rm -f /etc/lightdm.conf
- if [ -d /var/lib/lightdm ]; then
- rm -r /var/lib/lightdm
- fi
+ passwd -l lightdm > /dev/null
- if [ -d /var/log/lightdm ]; then
- rm -r /var/log/lightdm
- fi
-
- if [ -d /var/cache/lightdm ]; then
- rm -r /var/cache/lightdm
- fi
-
- if [ -d /var/run/lightdm/authority ]; then
- rm -r /var/run/lightdm/authority
- fi
+ systemd-tmpfiles --create /usr/lib/tmpfiles.d/lightdm.conf
+}
- if getent passwd lightdm >/dev/null; then
- userdel -r -f lightdm
- fi
- if getent group lightdm >/dev/null; then
- groupdel lightdm
- fi
+post_upgrade() {
+ post_install
}