From 243c99ff0d74d4bf4bcf8ca6dea95286bdda2c0a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 22 May 2013 00:41:15 +0100 Subject: Add #DEBHELPER# tokens to openssh-client.postinst and openssh-server.postinst. --- debian/openssh-server.postinst.in | 50 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'debian/openssh-server.postinst.in') 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 umask 022 -if [ "$action" != configure ] - then - exit 0 -fi - get_config_option() { option="$1" @@ -339,29 +334,32 @@ commit_mv_conffile () { } -create_sshdconfig -create_keys -vulnerable_host_keys -fix_statoverride -setup_sshd_user -if dpkg --compare-versions "$2" lt 1:5.2p1-1; then - remove_old_init_links -fi -setup_init -commit_mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd -# Renamed to /etc/ssh/moduli in 2.9.9 (!) -if dpkg --compare-versions "$2" lt 1:4.7p1-1; then - rm -f /etc/ssh/primes -fi -if dpkg --compare-versions "$2" lt 1:5.5p1-6; then - rm -f /var/run/sshd/.placeholder -fi +if [ "$action" = configure ]; then + create_sshdconfig + create_keys + vulnerable_host_keys + fix_statoverride + setup_sshd_user + if dpkg --compare-versions "$2" lt 1:5.2p1-1; then + remove_old_init_links + fi + setup_init + commit_mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd + # Renamed to /etc/ssh/moduli in 2.9.9 (!) + if dpkg --compare-versions "$2" lt 1:4.7p1-1; then + rm -f /etc/ssh/primes + fi + if dpkg --compare-versions "$2" lt 1:5.5p1-6; then + rm -f /var/run/sshd/.placeholder + fi -# Clean up old debconf templates. -db_unregister ssh/use_old_init_script -db_unregister ssh/encrypted_host_key_but_no_keygen -db_unregister ssh/disable_cr_auth + # Clean up old debconf templates. + db_unregister ssh/use_old_init_script + db_unregister ssh/encrypted_host_key_but_no_keygen + db_unregister ssh/disable_cr_auth +fi +#DEBHELPER# db_stop -- cgit v1.2.3