summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-06-12 18:23:54 +0000
committerColin Watson <cjwatson@debian.org>2007-06-12 18:23:54 +0000
commit60c59adc0fce137951c09a259b1c12aa0c1ee2f9 (patch)
treec95698ac9192c850aff1a3addea10c58ffd451c8
parent06a338593c752686cd41db37648a53b593e9f55f (diff)
* Move init script start links to S16, and remove stop links altogether
(closes: #122188).
-rw-r--r--debian/changelog2
-rw-r--r--debian/openssh-server.postinst15
2 files changed, 16 insertions, 1 deletions
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
58 * Build the .deb --with-ssl-engine (LP: #119295). 58 * Build the .deb --with-ssl-engine (LP: #119295).
59 * Use LSB functions in init scripts, and add an LSB-style header (thanks, 59 * Use LSB functions in init scripts, and add an LSB-style header (thanks,
60 Christian Perrier; closes: #389038). 60 Christian Perrier; closes: #389038).
61 * Move init script start links to S16, and remove stop links altogether
62 (closes: #122188).
61 63
62 -- Colin Watson <cjwatson@ubuntu.com> Tue, 12 Jun 2007 14:31:01 +0100 64 -- Colin Watson <cjwatson@ubuntu.com> Tue, 12 Jun 2007 14:31:01 +0100
63 65
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() {
344 chmod 644 /etc/default/ssh 344 chmod 644 /etc/default/ssh
345} 345}
346 346
347remove_old_init_links() {
348 # Yes, this only works with the SysV init script layout. I know.
349 # The important thing is that it doesn't actually *break* with
350 # file-rc ...
351 if [ -e /etc/rc2.d/S20ssh ]; then
352 update-rc.d -f ssh remove >/dev/null 2>&1
353 fi
354 rm -f /etc/rc0.d/K20ssh /etc/rc6.d/K20ssh
355}
356
347setup_init() { 357setup_init() {
348 if [ -x /etc/init.d/ssh ]; then 358 if [ -x /etc/init.d/ssh ]; then
349 update-rc.d ssh defaults >/dev/null 359 update-rc.d ssh start 16 2 3 4 5 . >/dev/null
350 if [ -x /usr/sbin/invoke-rc.d ]; then 360 if [ -x /usr/sbin/invoke-rc.d ]; then
351 invoke-rc.d ssh restart 361 invoke-rc.d ssh restart
352 else 362 else
@@ -375,6 +385,9 @@ setup_sshd_user
375if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then 385if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then
376 fix_conffile_permissions 386 fix_conffile_permissions
377fi 387fi
388if dpkg --compare-versions "$2" lt 1:4.6p1-1; then
389 remove_old_init_link
390fi
378setup_init 391setup_init
379commit_transfer_conffile /etc/default/ssh 392commit_transfer_conffile /etc/default/ssh
380commit_transfer_conffile /etc/init.d/ssh 393commit_transfer_conffile /etc/init.d/ssh