view debian/dcc-common.preinst @ 3:b689077d4918

Ignore old patches
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 14:31:24 +0100
parents f6716cb00029
children
line wrap: on
line source

#! /bin/sh
# preinst script for dcc-common
#
# 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)
	if [ "$1" = "upgrade" ]; then
		# if the following two files are real file (and no
		# symlinks), do
		! test -L /var/lib/dcc/map.txt && mv /var/lib/dcc/map.txt /etc/dcc
		! test -L /var/lib/dcc/ids && mv /var/lib/dcc/ids /etc/dcc
		if [ -f /etc/dcc/dcc_conf ]; then
		    rm -f /etc/dcc/dcc_conf
		fi
	fi
    ;;

    abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0