diff options
author | Colin Watson <cjwatson@debian.org> | 2009-01-14 12:21:55 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-01-14 12:21:55 +0000 |
commit | baa8cd245ea02057f31085f7e2aa523afcb030c1 (patch) | |
tree | 75fc1554474397d8f01a7204841169051a569c22 | |
parent | 6399215a54a22845b1310610011c9229e248e1be (diff) |
Disable OOM adjustment for vserver/OpenVZ (thanks, Karl Chen; closes:
#511771).
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/openssh-server.init | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 3f3d7a9c7..fca432400 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -2,6 +2,8 @@ openssh (1:5.1p1-6) UNRELEASED; urgency=low | |||
2 | 2 | ||
3 | * Open /proc/self/oom_adj with O_RDONLY or O_WRONLY as necessary, rather | 3 | * Open /proc/self/oom_adj with O_RDONLY or O_WRONLY as necessary, rather |
4 | than O_RDWR. | 4 | than O_RDWR. |
5 | * Disable OOM adjustment for vserver/OpenVZ (thanks, Karl Chen; closes: | ||
6 | #511771). | ||
5 | 7 | ||
6 | -- Colin Watson <cjwatson@debian.org> Wed, 14 Jan 2009 11:30:07 +0000 | 8 | -- Colin Watson <cjwatson@debian.org> Wed, 14 Jan 2009 11:30:07 +0000 |
7 | 9 | ||
diff --git a/debian/openssh-server.init b/debian/openssh-server.init index a1cc67797..75ea71525 100644 --- a/debian/openssh-server.init +++ b/debian/openssh-server.init | |||
@@ -21,6 +21,12 @@ if test -f /etc/default/ssh; then | |||
21 | . /etc/default/ssh | 21 | . /etc/default/ssh |
22 | fi | 22 | fi |
23 | 23 | ||
24 | # Are we in a virtual environment that doesn't support modifying | ||
25 | # /proc/self/oom_adj? | ||
26 | if grep -q 'envID:.*[1-9]' /proc/self/status; then | ||
27 | unset SSHD_OOM_ADJUST | ||
28 | fi | ||
29 | |||
24 | . /lib/lsb/init-functions | 30 | . /lib/lsb/init-functions |
25 | 31 | ||
26 | if [ -n "$2" ]; then | 32 | if [ -n "$2" ]; then |