diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/postinst | 14 | ||||
-rw-r--r-- | debian/prerm | 8 |
3 files changed, 18 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog index 92a41f314..67e4d81f2 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -2,6 +2,7 @@ openssh (1:3.6.1p2-11) UNRELEASED; urgency=low | |||
2 | 2 | ||
3 | * Comment out pam_limits in default configuration, for now at least | 3 | * Comment out pam_limits in default configuration, for now at least |
4 | (closes: #198254). | 4 | (closes: #198254). |
5 | * Use invoke-rc.d (if it exists) to run the init script. | ||
5 | 6 | ||
6 | -- Colin Watson <cjwatson@debian.org> Tue, 30 Dec 2003 13:38:02 +0000 | 7 | -- Colin Watson <cjwatson@debian.org> Tue, 30 Dec 2003 13:38:02 +0000 |
7 | 8 | ||
diff --git a/debian/postinst b/debian/postinst index af0f8a21c..f3d4cf6d5 100644 --- a/debian/postinst +++ b/debian/postinst | |||
@@ -289,7 +289,11 @@ fix_conffile_permissions() { | |||
289 | setup_startup() { | 289 | setup_startup() { |
290 | db_get ssh/run_sshd | 290 | db_get ssh/run_sshd |
291 | if [ "$RET" = "false" ] ; then | 291 | if [ "$RET" = "false" ] ; then |
292 | /etc/init.d/ssh stop 2>&1 >/dev/null | 292 | if [ -x /usr/sbin/invoke-rc.d ]; then |
293 | invoke-rc.d --quiet ssh stop | ||
294 | else | ||
295 | /etc/init.d/ssh stop | ||
296 | fi | ||
293 | touch /etc/ssh/sshd_not_to_be_run | 297 | touch /etc/ssh/sshd_not_to_be_run |
294 | else | 298 | else |
295 | rm -f /etc/ssh/sshd_not_to_be_run 2>/dev/null | 299 | rm -f /etc/ssh/sshd_not_to_be_run 2>/dev/null |
@@ -298,9 +302,13 @@ setup_startup() { | |||
298 | 302 | ||
299 | 303 | ||
300 | setup_init() { | 304 | setup_init() { |
301 | if [ -e /etc/init.d/ssh ]; then | 305 | if [ -x /etc/init.d/ssh ]; then |
302 | update-rc.d ssh defaults >/dev/null | 306 | update-rc.d ssh defaults >/dev/null |
303 | /etc/init.d/ssh restart | 307 | if [ -x /usr/sbin/invoke-rc.d ]; then |
308 | invoke-rc.d ssh restart | ||
309 | else | ||
310 | /etc/init.d/ssh restart | ||
311 | fi | ||
304 | fi | 312 | fi |
305 | } | 313 | } |
306 | 314 | ||
diff --git a/debian/prerm b/debian/prerm index 8ed7e07ec..5c1aa1351 100644 --- a/debian/prerm +++ b/debian/prerm | |||
@@ -20,8 +20,12 @@ case "$1" in | |||
20 | update-alternatives --quiet --remove rsh /usr/bin/ssh | 20 | update-alternatives --quiet --remove rsh /usr/bin/ssh |
21 | update-alternatives --quiet --remove rlogin /usr/bin/slogin | 21 | update-alternatives --quiet --remove rlogin /usr/bin/slogin |
22 | update-alternatives --quiet --remove rcp /usr/bin/scp | 22 | update-alternatives --quiet --remove rcp /usr/bin/scp |
23 | if [ -e /etc/init.d/ssh ]; then | 23 | if [ -x /etc/init.d/ssh ]; then |
24 | /etc/init.d/ssh stop | 24 | if [ -x /usr/sbin/invoke-rc.d ]; then |
25 | invoke-rc.d ssh stop | ||
26 | else | ||
27 | /etc/init.d/ssh stop | ||
28 | fi | ||
25 | fi | 29 | fi |
26 | # install-info --quiet --remove /usr/info/ssh-askpass.info.gz | 30 | # install-info --quiet --remove /usr/info/ssh-askpass.info.gz |
27 | ;; | 31 | ;; |