prerm is in lightdm 1.18.1-0ubuntu1.
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #!/bin/bash
# Debian lightdm package pre-removal script
# based on xdm script
# Copyright 2001 Branden Robinson.
# Licensed under the GNU General Public License, version 2. See the file
# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
# based on gdm pre-removal script
set -e
THIS_PACKAGE=lightdm
DAEMON=/usr/sbin/lightdm
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
# disown this question
db_unregister shared/default-x-display-manager
# does the question still exist?
if db_get shared/default-x-display-manager; then
db_metaget shared/default-x-display-manager owners
db_subst shared/default-x-display-manager choices "$RET"
db_get shared/default-x-display-manager
# are we removing the currently selected display manager?
if [ "$THIS_PACKAGE" = "$RET" ]; then
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then
if db_get "$RET"/daemon_name; then
if [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" = "$RET" ]; then
rm "$DEFAULT_DISPLAY_MANAGER_FILE"
fi
else
if [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" = "$DAEMON" ]; then
rm "$DEFAULT_DISPLAY_MANAGER_FILE"
fi
fi
fi
# ask the user to choose a new default
db_fset shared/default-x-display-manager seen false
db_input critical shared/default-x-display-manager || true
db_go
# if the display manager file doesn't exist, write it with the path
# to the new default display manager
if [ ! -e $DEFAULT_DISPLAY_MANAGER_FILE ]; then
db_get shared/default-x-display-manager
db_get "$RET"/daemon_name
echo "$RET" > "$DEFAULT_DISPLAY_MANAGER_FILE"
fi
fi
fi
fi
fi
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/lightdm/lightdm.conf.d/50-guest-wrapper.conf 1.9.5-0ubuntu1 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/lightdm/lightdm.conf.d/50-greeter-wrapper.conf 1.9.5-0ubuntu1 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/lightdm/lightdm.conf.d/50-xserver-command.conf 1.9.5-0ubuntu1 -- "$@"
# End automatically added section
exit 0
|