prerm is in astro-viewers 1.1ubuntu2.
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 68 69 70 71 72 73 74 | #!/bin/sh
set -e
# This is the default prerm file from the blends-dev package which is used
# in all meta packages. If there is a certain need to provide extra
# prerm files for some meta packages this template will be appended. Thus
# it will be checked whether debconf was just initialized.
#
# You should not insert the _DEBHELPER_ template in the special postscript
# file because it is in the end of this template anyway.
###########################################################################
# If the user menus are not needed/wished for a Blend (like for instance
# Debian Edu there is no need to install blends-common package. Thus we
# have to make sure that postinst does not try to include the menu stuff
# The most portable way to test a program for existence
# This fixes https://lintian.debian.org/tags/command-with-path-in-maintainer-script.html
pathfind() {
OLDIFS="$IFS"
IFS=:
for p in $PATH; do
if [ -x "$p/$*" ]; then
IFS="$OLDIFS"
return 0
fi
done
IFS="$OLDIFS"
return 1
}
if [ -d /etc/blends -a -f /etc/blends/blends.conf ] ; then
# Also verify that this Blend provides special configuration
# If not there is no need to execute the user menu code
if [ -d /etc/blends/astro -a -s /etc/blends/astro/astro.conf -a -s /etc/blends/blends.conf ] ; then
if pathfind blend-update-usermenus ; then
. /etc/blends/blends.conf
. /etc/blends/astro/astro.conf
blend-update-menus --blend astro
# Initialize debconf if not yet done
if [ _"$DEBCONF_REDIR" = _"" ]; then
. /usr/share/debconf/confmodule
db_version 2.0
fi
case "$1" in
deconfigure|failed-upgrade|upgrade)
;;
remove|purge)
db_get "shared/astro-config/usermenus" || true
case "$RET" in
"Each package installation")
blend-update-usermenus astro
;;
"End of installation")
touch /var/run/astro-config.usermenu
;;
esac
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
fi
fi
fi
exit 0
|