=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/etc/rc,v retrieving revision 1.519 retrieving revision 1.520 diff -c -r1.519 -r1.520 *** src/etc/rc 2017/10/12 18:14:05 1.519 --- src/etc/rc 2017/10/25 10:42:51 1.520 *************** *** 1,4 **** ! # $OpenBSD: rc,v 1.519 2017/10/12 18:14:05 rpe Exp $ # 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 --- 1,4 ---- ! # $OpenBSD: rc,v 1.520 2017/10/25 10:42:51 bluhm Exp $ # 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 *************** *** 49,64 **** # Apply sysctl.conf(5) settings. sysctl_conf() { ! stripcom /etc/sysctl.conf | ! while read _line; do ! sysctl "$_line" ! case $_line in kern.maxproc=*) ! update_limit -p maxproc;; kern.maxfiles=*) ! update_limit -n openfiles;; esac done } --- 49,68 ---- # Apply sysctl.conf(5) settings. sysctl_conf() { ! # do not use a pipe as limits would only be applied to the subshell ! set -- $(stripcom /etc/sysctl.conf) ! while [[ $# > 0 ]] ; do ! sysctl "$1" ! case "$1" in kern.maxproc=*) ! update_limit -p maxproc ! ;; kern.maxfiles=*) ! update_limit -n openfiles ! ;; esac + shift done }