diff options
author | Colin Watson <cjwatson@debian.org> | 2007-06-12 18:23:54 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-06-12 18:23:54 +0000 |
commit | 60c59adc0fce137951c09a259b1c12aa0c1ee2f9 (patch) | |
tree | c95698ac9192c850aff1a3addea10c58ffd451c8 /debian/openssh-server.postinst | |
parent | 06a338593c752686cd41db37648a53b593e9f55f (diff) |
* Move init script start links to S16, and remove stop links altogether
(closes: #122188).
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 15 |
1 files changed, 14 insertions, 1 deletions
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 | ||
347 | remove_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 | |||
347 | setup_init() { | 357 | setup_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 | |||
375 | if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then | 385 | if dpkg --compare-versions "$2" lt 1:3.6.1p2-2; then |
376 | fix_conffile_permissions | 386 | fix_conffile_permissions |
377 | fi | 387 | fi |
388 | if dpkg --compare-versions "$2" lt 1:4.6p1-1; then | ||
389 | remove_old_init_link | ||
390 | fi | ||
378 | setup_init | 391 | setup_init |
379 | commit_transfer_conffile /etc/default/ssh | 392 | commit_transfer_conffile /etc/default/ssh |
380 | commit_transfer_conffile /etc/init.d/ssh | 393 | commit_transfer_conffile /etc/init.d/ssh |