2
# This script can be called in the following ways:
4
# Before the package is installed:
5
# <new-preinst> install
7
# Before removed package is upgraded:
8
# <new-preinst> install <old-version>
10
# Before the package is upgraded:
11
# <new-preinst> upgrade <old-version>
14
# If postrm fails during upgrade or fails on failed upgrade:
15
# <old-preinst> abort-upgrade <new-version>
18
# Remove a no-longer used conffile
23
if [ -e "$CONFFILE" ]; then
24
md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
25
old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE '{s/ obsolete$//;s/.* //;p}}\" /var/lib/dpkg/status`"
26
if [ "$md5sum" != "$old_md5sum" ]; then
27
echo "Obsolete conffile $CONFFILE has been modified by you, renaming to .dpkg-bak"
28
mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
38
rm_conffile /etc/init.d/xserver-xorg-input-wacom
45
echo "$0 called with unknown argument \`$1'" 1>&2