diff options
author | Colin Watson <cjwatson@debian.org> | 2008-02-08 00:29:23 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2008-02-08 00:29:23 +0000 |
commit | 0cf35bd0df53b4e540a8b8525b5519f55737c327 (patch) | |
tree | 7acacb094349ccaab2e79445c2f033b8ee6fe0e2 /debian/openssh-server.preinst | |
parent | 74cc48e9516ec9b6fe9d77cc5cc833552d3a7e8d (diff) |
* Move /etc/pam.d/ssh to /etc/pam.d/sshd, allowing us to stop defining
SSHD_PAM_SERVICE (closes: #255870).
Diffstat (limited to 'debian/openssh-server.preinst')
-rw-r--r-- | debian/openssh-server.preinst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/openssh-server.preinst b/debian/openssh-server.preinst index 87871bdaa..4ca7f2f6e 100644 --- a/debian/openssh-server.preinst +++ b/debian/openssh-server.preinst | |||
@@ -36,6 +36,19 @@ prepare_transfer_conffile () { | |||
36 | fi | 36 | fi |
37 | } | 37 | } |
38 | 38 | ||
39 | prepare_mv_conffile () { | ||
40 | CONFFILE="$1" | ||
41 | [ -e "$CONFFILE" ] || return 0 | ||
42 | |||
43 | md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')" | ||
44 | old_md5sum="$(dpkg-query -W -f '${Conffiles}\n' openssh-server 2>/dev/null | sed 's/^ *//' | awk '$1 == "'"$CONFFILE"'" { print $2 }')" | ||
45 | if [ "$md5sum" = "$old_md5sum" ]; then | ||
46 | mv -f "$CONFFILE" "$CONFFILE.dpkg-old" | ||
47 | else | ||
48 | mv -f "$CONFFILE" "$CONFFILE.moving" | ||
49 | fi | ||
50 | } | ||
51 | |||
39 | if [ -d /etc/ssh-nonfree ] && [ ! -d /etc/ssh ]; then | 52 | if [ -d /etc/ssh-nonfree ] && [ ! -d /etc/ssh ]; then |
40 | version=1.2.27 | 53 | version=1.2.27 |
41 | fi | 54 | fi |
@@ -117,6 +130,10 @@ EOF | |||
117 | prepare_transfer_conffile /etc/init.d/ssh "$ETC_INIT_D_SSH" 0755 | 130 | prepare_transfer_conffile /etc/init.d/ssh "$ETC_INIT_D_SSH" 0755 |
118 | prepare_transfer_conffile /etc/pam.d/ssh "$ETC_PAM_D_SSH" 0644 | 131 | prepare_transfer_conffile /etc/pam.d/ssh "$ETC_PAM_D_SSH" 0644 |
119 | fi | 132 | fi |
133 | |||
134 | if dpkg --compare-versions "$version" lt 1:4.7p1-4; then | ||
135 | prepare_mv_conffile /etc/pam.d/ssh | ||
136 | fi | ||
120 | fi | 137 | fi |
121 | 138 | ||
122 | #DEBHELPER# | 139 | #DEBHELPER# |