Mercurial > notdcc
diff debian/dcc-common.preinst @ 2:f6716cb00029
Replace buggy stuff in deb dir, never make phone calls while working
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Tue, 10 Mar 2009 14:29:12 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/dcc-common.preinst Tue Mar 10 14:29:12 2009 +0100 @@ -0,0 +1,48 @@ +#! /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 + +