| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
if [ "$1" = install ] && [ ! -f "/etc/crypttab" ]; then |
| 6 |
cat <<-EOC >/etc/crypttab |
| 7 |
# <target name> <source device> <key file> <options> |
| 8 |
EOC |
| 9 |
fi |
| 10 |
|
| 11 |
# begin-remove-after: released:forky |
| 12 |
if [ "$1" = "upgrade" ] || [ "$1" = install ]; then |
| 13 |
if [ "$(dpkg-divert --truename /lib/cryptsetup/askpass)" = /lib/cryptsetup/askpass.cryptsetup ] && |
| 14 |
[ "$(dpkg-divert --listpackage /lib/cryptsetup/askpass)" = cryptsetup-nuke-password ] && |
| 15 |
[ "$(dpkg-divert --truename /usr/lib/cryptsetup/askpass)" = /usr/lib/cryptsetup/askpass ]; then |
| 16 |
# A pre-/usr-merge cryptsetup-nuke-password is installed. |
| 17 |
echo "Mitigating diversion of /lib/cryptsetup/askpass on behalf of cryptsetup-nuke-password" |
| 18 |
dpkg-divert --no-rename --package cryptsetup-nuke-password \ |
| 19 |
--divert /usr/lib/cryptsetup/askpass.usr-is-merged \ |
| 20 |
--add /usr/lib/cryptsetup/askpass |
| 21 |
fi |
| 22 |
fi |
| 23 |
# end-remove-after |
| 24 |
|
| 25 |
#DEBHELPER# |
| 26 |
|
| 27 |
exit 0 |