From 60c59adc0fce137951c09a259b1c12aa0c1ee2f9 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 12 Jun 2007 18:23:54 +0000 Subject: * Move init script start links to S16, and remove stop links altogether (closes: #122188). --- debian/changelog | 2 ++ debian/openssh-server.postinst | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index babd4571d..e07aa8f25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -58,6 +58,8 @@ openssh (1:4.6p1-1) UNRELEASED; urgency=low * Build the .deb --with-ssl-engine (LP: #119295). * Use LSB functions in init scripts, and add an LSB-style header (thanks, Christian Perrier; closes: #389038). + * Move init script start links to S16, and remove stop links altogether + (closes: #122188). -- Colin Watson Tue, 12 Jun 2007 14:31:01 +0100 diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 443c567ee..32d0e46ff 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst @@ -344,9 +344,19 @@ fix_conffile_permissions() { chmod 644 /etc/default/ssh } +remove_old_init_links() { + # Yes, this only works with the SysV init script layout. I know. + # The important thing is that it doesn't actually *break* with + # file-rc ... + if [ -e /etc/rc2.d/S20ssh ]; then + update-rc.d -f ssh remove >/dev/null 2>&1 + fi + rm -f /etc/rc0.d/K20ssh /etc/rc6.d/K20ssh +} + setup_init() { if [ -x /etc/init.d/ssh ]; then - update-rc.d ssh defaults >/dev/null + update-rc.d ssh start 16 2 3 4 5 . >/dev/null if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d ssh restart else @@ -375,6 +385,9 @@ setup_sshd_user if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then fix_conffile_permissions fi +if dpkg --compare-versions "$2" lt 1:4.6p1-1; then + remove_old_init_link +fi setup_init commit_transfer_conffile /etc/default/ssh commit_transfer_conffile /etc/init.d/ssh -- cgit v1.2.3