Browse Source

first set -max limit, then -cur, otherwise if -cur si higher than the current

max, it won't be set. noted by Evgeny Grin; ok millert@
OPENBSD_6_1
otto 8 years ago
parent
commit
bc56bde8af
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/etc/rc

+ 2
- 2
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.489 2016/10/06 20:20:41 reyk Exp $
# $OpenBSD: rc,v 1.490 2016/10/07 05:47:24 otto Exp $
# System startup script run by init on autoboot or after single-user. # System startup script run by init on autoboot or after single-user.
# Output and error are redirected to console by init, and the console is the # Output and error are redirected to console by init, and the console is the
@ -31,7 +31,7 @@ update_limit() {
local _cap=$2 _val # login.conf capability and its value local _cap=$2 _val # login.conf capability and its value
local _suffix local _suffix
for _suffix in {,-cur,-max}; do
for _suffix in {,-max,-cur}; do
_val=$(getcap -f /etc/login.conf -s ${_cap}${_suffix} daemon 2>/dev/null) _val=$(getcap -f /etc/login.conf -s ${_cap}${_suffix} daemon 2>/dev/null)
[[ -n $_val ]] || continue [[ -n $_val ]] || continue
[[ $_val == infinity ]] && _val=unlimited [[ $_val == infinity ]] && _val=unlimited


Loading…
Cancel
Save