preinst is in xymon-client 4.3.28-3build1.
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 | #! /bin/sh
# preinst script for xymon-client
. /usr/share/debconf/confmodule
set -e
# Workaround for http://bugs.debian.org/560317 in case debconf is too old like on Squeeze
export DPKG_MAINTSCRIPT_PACKAGE=${DPKG_MAINTSCRIPT_PACKAGE:-xymon-client}
export DPKG_MAINTSCRIPT_NAME=${DPKG_MAINTSCRIPT_NAME:-preinst}
case "$1" in
upgrade)
# Do the debconf stuff
db_get hobbit-client/HOBBITSERVERS
HOBBITSERVERS="$RET"
db_get hobbit-client/CLIENTHOSTNAME
CLIENTHOSTNAME="$RET"
if [ "$2" ] && dpkg --compare-versions "$2" lt "4.3.7"; then
db_get hobbit-client/automatic-xymon-migration
if [ "$RET" = "true" ]; then
MIGRATE="true"
echo "Migrating xymon-client files from hobbit ..."
fi
fi
db_stop
# Stop any previously running old server or client before
# migrating directories
invoke-rc.d --quiet hobbit-client stop || true
invoke-rc.d --quiet hobbit stop || true
[ "$MIGRATE" ] && test -d /var/lib/hobbit -a ! -d /var/lib/xymon && mv -v /var/lib/hobbit /var/lib/xymon || true
test -d /var/lib/xymon || mkdir /var/lib/xymon
[ "$MIGRATE" ] && test -e /etc/default/hobbit-client -a ! -e /etc/default/xymon-client && mv -v /etc/default/hobbit-client /etc/default/xymon-client || true
;;
esac
# Automatically added by dh_installdeb/11.1.4ubuntu1
dpkg-maintscript-helper mv_conffile /etc/init.d/hobbit-client /etc/init.d/xymon-client 4.3.7-1\~\~ xymon-client -- "$@"
dpkg-maintscript-helper mv_conffile /etc/logrotate.d/hobbit-client /etc/logrotate.d/xymon-client 4.3.7-1\~\~ xymon-client -- "$@"
dpkg-maintscript-helper mv_conffile /etc/hobbit/localclient.cfg /etc/xymon/localclient.cfg 4.3.7-1\~\~ xymon-client -- "$@"
dpkg-maintscript-helper mv_conffile /etc/hobbit/hobbitclient.cfg /etc/xymon/xymonclient.cfg 4.3.7-1\~\~ xymon-client -- "$@"
dpkg-maintscript-helper mv_conffile /etc/hobbit/clientlaunch.cfg /etc/xymon/clientlaunch.cfg 4.3.7-1\~\~ xymon-client -- "$@"
# End automatically added section
exit 0
|