| 1 |
#!/bin/sh |
| 2 |
# preinst script for network-manager-l2tp |
| 3 |
# |
| 4 |
# see: dh_installdeb(1) |
| 5 |
set -e |
| 6 |
|
| 7 |
case "$1" in |
| 8 |
install|upgrade|abort-upgrade) |
| 9 |
# remove any network-manager-l2tp < 1.2.12 transient ipsec-*.secrets |
| 10 |
# files that were never cleaned up (as happens when the nm-l2tp-service |
| 11 |
# is ungracefully killed during a VPN connection) |
| 12 |
if dpkg --compare-versions "$2" lt-nl "1.2.12"; then |
| 13 |
rm -f /etc/ipsec.d/nm-l2tp-ipsec-*.secrets |
| 14 |
fi |
| 15 |
;; |
| 16 |
|
| 17 |
*) |
| 18 |
echo "preinst called with unknown argument \`$1'" >&2 |
| 19 |
exit 1 |
| 20 |
;; |
| 21 |
esac |
| 22 |
|
| 23 |
# dh_installdeb will replace this with shell code automatically |
| 24 |
# generated by other debhelper scripts. |
| 25 |
|
| 26 |
#DEBHELPER# |
| 27 |
|
| 28 |
exit 0 |
| 29 |
|