preinst is in vdr-plugin-vnsiserver 1:1.3.1-2.
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 | #!/bin/sh
set -e
# Automatically added by dh_vdrplugin_enable
#
# 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-vnsiserver vnsiserver.conf 50
# End automatically added section
|