preinst is in tpb 0.6.4-8.
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 | #!/bin/sh
PACKAGE="tpb"
CONFIG="/etc/default/$PACKAGE"
CONFIG_OLD="/etc/X11/Xsession.d/90tpb"
set -e
. /usr/share/debconf/confmodule || exit 0
# load data from old configuration file into debconf
if [ -f $CONFIG_OLD ]; then
. $CONFIG_OLD
if ! [ -z $START_TPB ]; then
db_set $PACKAGE/autostart $START_TPB
fi
fi
# override with data from new configuration
if [ -f $CONFIG ]; then
. $CONFIG
if ! [ -z $START_TPB ]; then
db_set $PACKAGE/autostart $START_TPB
fi
fi
# Remove any old devfs config in case it's still lingering
if [ -f /etc/devfs/conf.d/tpb ] ; then
rm -f /etc/devfs/conf.d/tpb
fi
# Automatically added by dh_installudev
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/udev/rules.d/92_tpb.rules" ]; then
if [ "`md5sum \"/etc/udev/rules.d/92_tpb.rules\" | sed -e \"s/ .*//\"`" = \
"`dpkg-query -W -f='${Conffiles}' tpb | sed -n -e \"\\\\' /etc/udev/rules.d/92_tpb.rules '{s/ obsolete$//;s/.* //p}\"`" ]
then
rm -f "/etc/udev/rules.d/92_tpb.rules"
fi
fi
fi
# End automatically added section
exit 0
|