summaryrefslogtreecommitdiffstats
path: root/debian/cryptsetup.preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/cryptsetup.preinst')
-rw-r--r--debian/cryptsetup.preinst14
1 files changed, 14 insertions, 0 deletions
diff --git a/debian/cryptsetup.preinst b/debian/cryptsetup.preinst
index 7f1e1bc..2e5a7fc 100644
--- a/debian/cryptsetup.preinst
+++ b/debian/cryptsetup.preinst
@@ -8,6 +8,20 @@ if [ "$1" = install ] && [ ! -f "/etc/crypttab" ]; then
EOC
fi
+# begin-remove-after: released:forky
+if [ "$1" = "upgrade" ] || [ "$1" = install ]; then
+ if [ "$(dpkg-divert --truename /lib/cryptsetup/askpass)" = /lib/cryptsetup/askpass.cryptsetup ] &&
+ [ "$(dpkg-divert --listpackage /lib/cryptsetup/askpass)" = cryptsetup-nuke-password ] &&
+ [ "$(dpkg-divert --truename /usr/lib/cryptsetup/askpass)" = /usr/lib/cryptsetup/askpass ]; then
+ # A pre-/usr-merge cryptsetup-nuke-password is installed.
+ echo "Mitigating diversion of /lib/cryptsetup/askpass on behalf of cryptsetup-nuke-password"
+ dpkg-divert --no-rename --package cryptsetup-nuke-password \
+ --divert /usr/lib/cryptsetup/askpass.usr-is-merged \
+ --add /usr/lib/cryptsetup/askpass
+ fi
+fi
+# end-remove-after
+
#DEBHELPER#
exit 0