postrm is in sddm 0.17.0-1ubuntu7.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 43 44 45 46 47 48 49 50 51 52 53 | #!/bin/sh
set -e
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
DEFAULT_SERVICE=/etc/systemd/system/display-manager.service
case "$1" in
purge)
update-rc.d sddm remove > /dev/null
if [ -d /var/cache/sddm ]; then rm -r /var/cache/sddm; fi
if [ -d /var/lib/sddm ]; then rm -r /var/lib/sddm; fi
if [ -d /var/run/sddm ]; then rm -r /var/run/sddm; fi
if [ -d /var/log/sddm ]; then rm -r /var/log/sddm; fi
if [ -d /run/sddm ]; then rm -r /run/sddm; fi
if [ -f /var/log/sddm.log ]; then rm /var/log/sddm.log; fi
if getent passwd sddm >/dev/null; then
if [ -x /usr/sbin/deluser ]; then
deluser --system sddm >&2 ||
echo "Could not remove sddm user." >&2
fi
fi
if getent group sddm >/dev/null; then
if [ -x /usr/sbin/delgroup ]; then
delgroup --system sddm >&2 ||
echo "Could not remove sddm group." >&2
fi
fi
if [ ! -e "$DEFAULT_DISPLAY_MANAGER_FILE" ] &&
[ -h "$DEFAULT_SERVICE" ] && [ ! -e "$DEFAULT_SERVICE" ]; then
# Dangling symlink, no other display-manager installed
rm "$DEFAULT_SERVICE"
fi
;;
abort-install|abort-upgrade)
# roll back displacement of default display manager file
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp" ]; then
# FIXME - redo this part uses shell-lib.sh from xfree86
#observe "rolling back change of default X display manager"
mv "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp" "$DEFAULT_DISPLAY_MANAGER_FILE"
fi
;;
esac
# Automatically added by dh_installdebconf/11.1.6ubuntu1
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
exit 0
|