diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/openssh-server.ssh.init | 46 |
2 files changed, 24 insertions, 23 deletions
diff --git a/debian/changelog b/debian/changelog index 5d7c0529e..63bc8f151 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -2,6 +2,7 @@ openssh (1:5.9p1-3) UNRELEASED; urgency=low | |||
2 | 2 | ||
3 | * debconf template translations: | 3 | * debconf template translations: |
4 | - Update Polish (thanks, Michał Kułach; closes: #659829). | 4 | - Update Polish (thanks, Michał Kułach; closes: #659829). |
5 | * Ignore errors writing to console in init script (closes: #546743). | ||
5 | 6 | ||
6 | -- Colin Watson <cjwatson@debian.org> Tue, 14 Feb 2012 11:01:44 +0000 | 7 | -- Colin Watson <cjwatson@debian.org> Tue, 14 Feb 2012 11:01:44 +0000 |
7 | 8 | ||
diff --git a/debian/openssh-server.ssh.init b/debian/openssh-server.ssh.init index 62bcc21d4..a069f3ead 100644 --- a/debian/openssh-server.ssh.init +++ b/debian/openssh-server.ssh.init | |||
@@ -37,10 +37,10 @@ check_for_no_start() { | |||
37 | # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists | 37 | # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists |
38 | if [ -e /etc/ssh/sshd_not_to_be_run ]; then | 38 | if [ -e /etc/ssh/sshd_not_to_be_run ]; then |
39 | if [ "$1" = log_end_msg ]; then | 39 | if [ "$1" = log_end_msg ]; then |
40 | log_end_msg 0 | 40 | log_end_msg 0 || true |
41 | fi | 41 | fi |
42 | if ! run_by_init; then | 42 | if ! run_by_init; then |
43 | log_action_msg "OpenBSD Secure Shell server not in use (/etc/ssh/sshd_not_to_be_run)" | 43 | log_action_msg "OpenBSD Secure Shell server not in use (/etc/ssh/sshd_not_to_be_run)" || true |
44 | fi | 44 | fi |
45 | exit 0 | 45 | exit 0 |
46 | fi | 46 | fi |
@@ -52,7 +52,7 @@ check_dev_null() { | |||
52 | log_end_msg 1 || true | 52 | log_end_msg 1 || true |
53 | fi | 53 | fi |
54 | if ! run_by_init; then | 54 | if ! run_by_init; then |
55 | log_action_msg "/dev/null is not a character device!" | 55 | log_action_msg "/dev/null is not a character device!" || true |
56 | fi | 56 | fi |
57 | exit 1 | 57 | exit 1 |
58 | fi | 58 | fi |
@@ -79,51 +79,51 @@ case "$1" in | |||
79 | check_privsep_dir | 79 | check_privsep_dir |
80 | check_for_no_start | 80 | check_for_no_start |
81 | check_dev_null | 81 | check_dev_null |
82 | log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" | 82 | log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" || true |
83 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then | 83 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then |
84 | log_end_msg 0 | 84 | log_end_msg 0 || true |
85 | else | 85 | else |
86 | log_end_msg 1 | 86 | log_end_msg 1 || true |
87 | fi | 87 | fi |
88 | ;; | 88 | ;; |
89 | stop) | 89 | stop) |
90 | log_daemon_msg "Stopping OpenBSD Secure Shell server" "sshd" | 90 | log_daemon_msg "Stopping OpenBSD Secure Shell server" "sshd" || true |
91 | if start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid; then | 91 | if start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid; then |
92 | log_end_msg 0 | 92 | log_end_msg 0 || true |
93 | else | 93 | else |
94 | log_end_msg 1 | 94 | log_end_msg 1 || true |
95 | fi | 95 | fi |
96 | ;; | 96 | ;; |
97 | 97 | ||
98 | reload|force-reload) | 98 | reload|force-reload) |
99 | check_for_no_start | 99 | check_for_no_start |
100 | check_config | 100 | check_config |
101 | log_daemon_msg "Reloading OpenBSD Secure Shell server's configuration" "sshd" | 101 | log_daemon_msg "Reloading OpenBSD Secure Shell server's configuration" "sshd" || true |
102 | if start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd; then | 102 | if start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd; then |
103 | log_end_msg 0 | 103 | log_end_msg 0 || true |
104 | else | 104 | else |
105 | log_end_msg 1 | 105 | log_end_msg 1 || true |
106 | fi | 106 | fi |
107 | ;; | 107 | ;; |
108 | 108 | ||
109 | restart) | 109 | restart) |
110 | check_privsep_dir | 110 | check_privsep_dir |
111 | check_config | 111 | check_config |
112 | log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" | 112 | log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true |
113 | start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /var/run/sshd.pid | 113 | start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /var/run/sshd.pid |
114 | check_for_no_start log_end_msg | 114 | check_for_no_start log_end_msg |
115 | check_dev_null log_end_msg | 115 | check_dev_null log_end_msg |
116 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then | 116 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then |
117 | log_end_msg 0 | 117 | log_end_msg 0 || true |
118 | else | 118 | else |
119 | log_end_msg 1 | 119 | log_end_msg 1 || true |
120 | fi | 120 | fi |
121 | ;; | 121 | ;; |
122 | 122 | ||
123 | try-restart) | 123 | try-restart) |
124 | check_privsep_dir | 124 | check_privsep_dir |
125 | check_config | 125 | check_config |
126 | log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" | 126 | log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true |
127 | set +e | 127 | set +e |
128 | start-stop-daemon --stop --quiet --retry 30 --pidfile /var/run/sshd.pid | 128 | start-stop-daemon --stop --quiet --retry 30 --pidfile /var/run/sshd.pid |
129 | RET="$?" | 129 | RET="$?" |
@@ -134,20 +134,20 @@ case "$1" in | |||
134 | check_for_no_start log_end_msg | 134 | check_for_no_start log_end_msg |
135 | check_dev_null log_end_msg | 135 | check_dev_null log_end_msg |
136 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then | 136 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then |
137 | log_end_msg 0 | 137 | log_end_msg 0 || true |
138 | else | 138 | else |
139 | log_end_msg 1 | 139 | log_end_msg 1 || true |
140 | fi | 140 | fi |
141 | ;; | 141 | ;; |
142 | 1) | 142 | 1) |
143 | # daemon not running | 143 | # daemon not running |
144 | log_progress_msg "(not running)" | 144 | log_progress_msg "(not running)" || true |
145 | log_end_msg 0 | 145 | log_end_msg 0 || true |
146 | ;; | 146 | ;; |
147 | *) | 147 | *) |
148 | # failed to stop | 148 | # failed to stop |
149 | log_progress_msg "(failed to stop)" | 149 | log_progress_msg "(failed to stop)" || true |
150 | log_end_msg 1 | 150 | log_end_msg 1 || true |
151 | ;; | 151 | ;; |
152 | esac | 152 | esac |
153 | ;; | 153 | ;; |
@@ -157,7 +157,7 @@ case "$1" in | |||
157 | ;; | 157 | ;; |
158 | 158 | ||
159 | *) | 159 | *) |
160 | log_action_msg "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}" | 160 | log_action_msg "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}" || true |
161 | exit 1 | 161 | exit 1 |
162 | esac | 162 | esac |
163 | 163 | ||