File: gdm3.postrm

package info (click to toggle)
gdm3 3.30.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 15,696 kB
  • sloc: ansic: 27,919; sh: 5,307; makefile: 1,144; xml: 817; sed: 16
file content (42 lines) | stat: -rw-r--r-- 1,377 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
set -e

# Need to load this before any output on stdout/stderr
# otherwise the debconf command-stream will get
# some invalid input and cause the failure of postrm.
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
        . /usr/share/debconf/confmodule
fi

if [ "$1" = "purge" ] ; then
        update-rc.d gdm3 remove >/dev/null
        if [ -d /etc/gdm3 ]; then
		for i in Init PreSession PostSession PostLogin; do
			if [ -d /etc/gdm3/$i ]; then
				rmdir --ignore-fail-on-non-empty /etc/gdm3/$i 2> /dev/null
			fi
		done
		rm -f /etc/gdm3/greeter.dconf-defaults
		rmdir --ignore-fail-on-non-empty /etc/gdm3
        fi
        if which ucf >/dev/null; then
        	ucf --purge /etc/gdm3/greeter.dconf-defaults
        	ucfr --purge gdm3 /etc/gdm3/greeter.dconf-defaults
        fi
	rm -rf /var/lib/gdm3
	rm -rf /var/run/gdm3
	rm -rf /var/log/gdm3
	rm -rf /var/cache/gdm
        if getent passwd Debian-gdm >/dev/null; then
                if which deluser >/dev/null; then
                        deluser --system Debian-gdm || echo "Could not remove Debian-gdm user."
                fi
        fi
        if getent group Debian-gdm >/dev/null; then
                if which delgroup >/dev/null; then
                        delgroup --system Debian-gdm || echo "Could not remove Debian-gdm group."
                fi
        fi
fi

#DEBHELPER#