preinst is in dpm-srm-server-mysql 1.10.0-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 | #!/bin/sh
set -e
# Version 1.10.0 starts using defaults-disabled
# Remove rc.d links if upgrading from an older version and the service is
# disabled in /etc/default
if [ -n "$2" ] ; then
if dpkg --compare-versions "$2" "<<" "1.10.0" ; then
[ -r /etc/default/dpm-srmv1 ] && . /etc/default/dpm-srmv1
if [ "${RUN_SRMV1DAEMON}" != "yes" ] ; then
update-rc.d -f dpm-srmv1 remove >/dev/null
fi
[ -r /etc/default/dpm-srmv2 ] && . /etc/default/dpm-srmv2
if [ "${RUN_SRMV2DAEMON}" != "yes" ] ; then
update-rc.d -f dpm-srmv2 remove >/dev/null
fi
[ -r /etc/default/dpm-srmv2.2 ] && . /etc/default/dpm-srmv2.2
if [ "${RUN_SRMV2DAEMON}" != "yes" ] ; then
update-rc.d -f dpm-srmv2.2 remove >/dev/null
fi
fi
fi
|