summaryrefslogtreecommitdiff
path: root/debian/openssh-server.postrm
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-05-22 00:59:33 +0100
committerColin Watson <cjwatson@debian.org>2013-05-22 00:59:33 +0100
commitafd3292952a9f0bb107046785ddcfad446d69b89 (patch)
tree9894061066d4a1804faecd731b2899bbd924b63e /debian/openssh-server.postrm
parent6f4754f269cb99609cc27d358873bcbdb574cfd6 (diff)
Replace old manual conffile handling code with dpkg-maintscript-helper,
via dh_installdeb.
Diffstat (limited to 'debian/openssh-server.postrm')
-rw-r--r--debian/openssh-server.postrm27
1 files changed, 0 insertions, 27 deletions
diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm
index bc55df118..9bb9f1839 100644
--- a/debian/openssh-server.postrm
+++ b/debian/openssh-server.postrm
@@ -2,32 +2,7 @@
2 2
3#DEBHELPER# 3#DEBHELPER#
4 4
5abort_mv_conffile () {
6 CONFFILE="$1"
7
8 if [ ! -e "$CONFFILE" ]; then
9 if [ -e "$CONFFILE.dpkg-old" ]; then
10 mv -f "$CONFFILE.dpkg-old" "$CONFFILE"
11 elif [ -e "$CONFFILE.moving" ]; then
12 mv -f "$CONFFILE.moving" "$CONFFILE"
13 fi
14 fi
15}
16
17finish_mv_conffile () {
18 CONFFILE="$1"
19
20 if [ -e "$CONFFILE.dpkg-old" ]; then
21 rm -f "$CONFFILE.dpkg-old"
22 fi
23}
24
25case $1 in 5case $1 in
26 abort-install|abort-upgrade)
27 if dpkg --compare-versions "$2" lt 1:4.7p1-4; then
28 abort_mv_conffile /etc/pam.d/ssh
29 fi
30 ;;
31 purge) 6 purge)
32 # Remove all non-conffiles that ssh might create, so that we 7 # Remove all non-conffiles that ssh might create, so that we
33 # can smoothly remove /etc/ssh if and only if the user 8 # can smoothly remove /etc/ssh if and only if the user
@@ -46,8 +21,6 @@ case $1 in
46 if which deluser >/dev/null 2>&1; then 21 if which deluser >/dev/null 2>&1; then
47 deluser --quiet sshd > /dev/null || true 22 deluser --quiet sshd > /dev/null || true
48 fi 23 fi
49
50 finish_mv_conffile /etc/pam.d/ssh
51 ;; 24 ;;
52esac 25esac
53 26