diff options
Diffstat (limited to 'debian/openssh-server.init')
-rw-r--r-- | debian/openssh-server.init | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/debian/openssh-server.init b/debian/openssh-server.init index ddd1e292c..01f00dc0a 100644 --- a/debian/openssh-server.init +++ b/debian/openssh-server.init | |||
@@ -16,7 +16,7 @@ set -e | |||
16 | test -x /usr/sbin/sshd || exit 0 | 16 | test -x /usr/sbin/sshd || exit 0 |
17 | ( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 | 17 | ( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 |
18 | 18 | ||
19 | SSHD_OOM_ADJUST=-17 | 19 | export SSHD_OOM_ADJUST=-17 |
20 | if test -f /etc/default/ssh; then | 20 | if test -f /etc/default/ssh; then |
21 | . /etc/default/ssh | 21 | . /etc/default/ssh |
22 | fi | 22 | fi |
@@ -71,15 +71,6 @@ check_config() { | |||
71 | fi | 71 | fi |
72 | } | 72 | } |
73 | 73 | ||
74 | adjust_oom() { | ||
75 | if [ -e /var/run/sshd.pid ]; then | ||
76 | PID="$(head -n1 /var/run/sshd.pid)" | ||
77 | if [ -e "/proc/$PID/oom_adj" ]; then | ||
78 | printf '%s' "$SSHD_OOM_ADJUST" >"/proc/$PID/oom_adj" || true | ||
79 | fi | ||
80 | fi | ||
81 | } | ||
82 | |||
83 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" | 74 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" |
84 | 75 | ||
85 | case "$1" in | 76 | case "$1" in |
@@ -90,7 +81,6 @@ case "$1" in | |||
90 | log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" | 81 | log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" |
91 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then | 82 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then |
92 | log_end_msg 0 | 83 | log_end_msg 0 |
93 | adjust_oom | ||
94 | else | 84 | else |
95 | log_end_msg 1 | 85 | log_end_msg 1 |
96 | fi | 86 | fi |
@@ -124,7 +114,6 @@ case "$1" in | |||
124 | check_dev_null log_end_msg | 114 | check_dev_null log_end_msg |
125 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then | 115 | if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then |
126 | log_end_msg 0 | 116 | log_end_msg 0 |
127 | adjust_oom | ||
128 | else | 117 | else |
129 | log_end_msg 1 | 118 | log_end_msg 1 |
130 | fi | 119 | fi |