#!/bin/sh
set -e

if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl "3.6.1"; then
    # If this file exists and its only content is "force-unsafe-io", then it was
    # generated by #775076 and must be removed.
    if [ -e /etc/dpkg/dpkg.cfg.d/autopkgtest ]; then
            if [ "`cat /etc/dpkg/dpkg.cfg.d/autopkgtest`" = "force-unsafe-io" ]; then
                    echo "Cleaning up erroneous /etc/dpkg/dpkg.cfg.d/autopkgtest..."
                    rm -f /etc/dpkg/dpkg.cfg.d/autopkgtest
            fi
    fi
fi

#DEBHELPER#
