summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-05-22 00:41:15 +0100
committerColin Watson <cjwatson@debian.org>2013-05-22 00:41:15 +0100
commit243c99ff0d74d4bf4bcf8ca6dea95286bdda2c0a (patch)
tree06803bf82d716a66cff54331ac506044a149c0a5
parent201b985b6442b39c14a0d97decf626af1100b31b (diff)
Add #DEBHELPER# tokens to openssh-client.postinst and
openssh-server.postinst.
-rw-r--r--debian/changelog2
-rw-r--r--debian/openssh-client.postinst13
-rw-r--r--debian/openssh-server.postinst.in50
3 files changed, 32 insertions, 33 deletions
diff --git a/debian/changelog b/debian/changelog
index 7e32bad3b..acbde46f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ openssh (1:6.2p2-2) UNRELEASED; urgency=low
17 * Remove support for upgrading directly from ssh-nonfree. 17 * Remove support for upgrading directly from ssh-nonfree.
18 * Remove lots of maintainer script support for direct upgrades from 18 * Remove lots of maintainer script support for direct upgrades from
19 pre-etch (three releases before current stable). 19 pre-etch (three releases before current stable).
20 * Add #DEBHELPER# tokens to openssh-client.postinst and
21 openssh-server.postinst.
20 22
21 -- Colin Watson <cjwatson@debian.org> Tue, 21 May 2013 17:49:35 +0100 23 -- Colin Watson <cjwatson@debian.org> Tue, 21 May 2013 17:49:35 +0100
22 24
diff --git a/debian/openssh-client.postinst b/debian/openssh-client.postinst
index d752d01c9..85cedc406 100644
--- a/debian/openssh-client.postinst
+++ b/debian/openssh-client.postinst
@@ -5,11 +5,6 @@ oldversion="$2"
5 5
6umask 022 6umask 022
7 7
8if [ "$action" != configure ]
9 then
10 exit 0
11fi
12
13 8
14create_alternatives() { 9create_alternatives() {
15# Create alternatives for the various r* tools. 10# Create alternatives for the various r* tools.
@@ -40,7 +35,11 @@ set_ssh_agent_permissions() {
40} 35}
41 36
42 37
43create_alternatives 38if [ "$action" = configure ]; then
44set_ssh_agent_permissions 39 create_alternatives
40 set_ssh_agent_permissions
41fi
42
43#DEBHELPER#
45 44
46exit 0 45exit 0
diff --git a/debian/openssh-server.postinst.in b/debian/openssh-server.postinst.in
index 245333234..a91ec082a 100644
--- a/debian/openssh-server.postinst.in
+++ b/debian/openssh-server.postinst.in
@@ -8,11 +8,6 @@ db_version 2.0
8 8
9umask 022 9umask 022
10 10
11if [ "$action" != configure ]
12 then
13 exit 0
14fi
15
16 11
17get_config_option() { 12get_config_option() {
18 option="$1" 13 option="$1"
@@ -339,29 +334,32 @@ commit_mv_conffile () {
339} 334}
340 335
341 336
342create_sshdconfig 337if [ "$action" = configure ]; then
343create_keys 338 create_sshdconfig
344vulnerable_host_keys 339 create_keys
345fix_statoverride 340 vulnerable_host_keys
346setup_sshd_user 341 fix_statoverride
347if dpkg --compare-versions "$2" lt 1:5.2p1-1; then 342 setup_sshd_user
348 remove_old_init_links 343 if dpkg --compare-versions "$2" lt 1:5.2p1-1; then
349fi 344 remove_old_init_links
350setup_init 345 fi
351commit_mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd 346 setup_init
352# Renamed to /etc/ssh/moduli in 2.9.9 (!) 347 commit_mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd
353if dpkg --compare-versions "$2" lt 1:4.7p1-1; then 348 # Renamed to /etc/ssh/moduli in 2.9.9 (!)
354 rm -f /etc/ssh/primes 349 if dpkg --compare-versions "$2" lt 1:4.7p1-1; then
355fi 350 rm -f /etc/ssh/primes
356if dpkg --compare-versions "$2" lt 1:5.5p1-6; then 351 fi
357 rm -f /var/run/sshd/.placeholder 352 if dpkg --compare-versions "$2" lt 1:5.5p1-6; then
358fi 353 rm -f /var/run/sshd/.placeholder
354 fi
359 355
360# Clean up old debconf templates. 356 # Clean up old debconf templates.
361db_unregister ssh/use_old_init_script 357 db_unregister ssh/use_old_init_script
362db_unregister ssh/encrypted_host_key_but_no_keygen 358 db_unregister ssh/encrypted_host_key_but_no_keygen
363db_unregister ssh/disable_cr_auth 359 db_unregister ssh/disable_cr_auth
360fi
364 361
362#DEBHELPER#
365 363
366db_stop 364db_stop
367 365