diff options
author | root <root@build-vm.(none)> | 2010-06-14 15:51:25 -0700 |
---|---|---|
committer | root <root@build-vm.(none)> | 2010-06-14 15:51:25 -0700 |
commit | c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5 (patch) | |
tree | 86ee5befd8195f56dcd91f9fd4e06368bf507a11 /debian/conntrackd.preinst | |
download | conntrack-tools-c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5.tar.gz conntrack-tools-c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5.zip |
debian conntrack 0.9.14-2
Diffstat (limited to 'debian/conntrackd.preinst')
-rw-r--r-- | debian/conntrackd.preinst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/conntrackd.preinst b/debian/conntrackd.preinst new file mode 100644 index 0000000..2bb65ef --- /dev/null +++ b/debian/conntrackd.preinst @@ -0,0 +1,25 @@ +#!/bin/sh +set -e + +action=$1 +version=$2 + +if [ "$action" = upgrade -a -n "$version" ] && + dpkg --compare-versions "$version" lt "1:0.9.8-1" && + test -f /etc/conntrackd.conf && + ! test -e /etc/conntrackd/conntrackd.conf; then + # package versions < 0.9.8-1 had the configuration file in a + # non-standard location + mkdir -p /etc/conntrackd + if md5sum /etc/conntrackd.conf 2> /dev/null | + grep -q 9e463d9bb7902e513da1b90b326bd43d + then + # unmodified version, dpkg should not prompt, delete in postinst + mv /etc/conntrackd.conf /etc/conntrackd.conf.dpkg-updating + else + # move to new location to make dpkg prompt + mv /etc/conntrackd.conf /etc/conntrackd/conntrackd.conf + fi +fi + +#DEBHELPER# |