preinst is in vdr-plugin-xine 0.9.4-14build1.
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 | #! /bin/sh
# preinst script for vdr-plugin-xine
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
#
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case $1 in
install|upgrade)
[ ! -L /var/lib/vdr/plugins/xine ] || rm -f /var/lib/vdr/plugins/xine
;;
abort-upgrade)
# nothing to do
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_vdrplugin_enable/UNDECLARED
#
# To enable a vdr plugin, its config must be symlinked to /etc/vdr/conf.d.
# This must only be done when installing a plugin package or upgrading
# from an old package, which does not support the conf.d mechanism.
#
# Before installing, we remember if the plugin-config in conf.avail
# does not exist (because this is a new installation or an upgrade
# from an old installation or the config was removed by the admin)
# by creating a /etc/vdr/conf.d/*.dpkg-vdr-plugin-enable "tag"-file.
#
dh_vdrplugin_prepare_enable() {
local pkgname="$1"
shift
while [ $# -gt 0 ] ; do
local config=$1
local priority=$2
shift 2
local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $pkgname | sed -n -e "\' $config ' { s/ obsolete$//; s/.* //; p }")"
if [ -z "$old_md5sum" ] ; then
mkdir -p "/etc/vdr/conf.d"
touch "/etc/vdr/conf.d/$priority-$config.dpkg-vdrplugin-enable"
fi
done
}
dh_vdrplugin_prepare_enable vdr-plugin-xine xine.conf 50
# End automatically added section
exit 0
|