diff options
author | Renato Botelho <renato@netgate.com> | 2016-12-05 15:52:27 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-12-05 15:52:27 -0200 |
commit | ec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d (patch) | |
tree | d7d40ac77bda3d6fc35814a1a6484eb324b3c7df /etc | |
parent | ca825f0a56d174ca9d3478d87cdca9f318a50cc6 (diff) | |
parent | 356fbc072920d7e71c42b310d6bfa2d1a3d36f9f (diff) | |
download | FreeBSD-src-ec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d.zip FreeBSD-src-ec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d.tar.gz |
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'etc')
-rw-r--r-- | etc/mtree/BSD.tests.dist | 2 | ||||
-rwxr-xr-x | etc/rc.d/swaplate | 2 | ||||
-rw-r--r-- | etc/rc.subr | 24 |
3 files changed, 15 insertions, 13 deletions
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index ae17129..6cd0e85 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -419,6 +419,8 @@ .. .. kqueue + libkqueue + .. .. mac bsdextended diff --git a/etc/rc.d/swaplate b/etc/rc.d/swaplate index f335481..fbfae2a 100755 --- a/etc/rc.d/swaplate +++ b/etc/rc.d/swaplate @@ -12,7 +12,7 @@ name="swaplate" desc="Setup late swap space" start_cmd='/sbin/swapon -aLq' -stop_cmd='/sbin/swapoff -aq' +stop_cmd='/sbin/swapoff -aLq' load_rc_config swap run_rc_command "$1" diff --git a/etc/rc.subr b/etc/rc.subr index 8da111a..4b8cbaa 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1205,18 +1205,18 @@ $command $rc_flags $command_args" # Apply protect(1) to the PID if ${name}_oomprotect is set. case "$rc_arg" in start) - if [ -n "$_oomprotect" ]; then - if [ -f "${PROTECT}" ]; then - pid=$(check_process $command) - case $_oomprotect in - [Aa][Ll][Ll]) - ${PROTECT} -i -p ${pid} - ;; - [Yy][Ee][Ss]) - ${PROTECT} -p ${pid} - ;; - esac - fi + # We cannot use protect(1) inside jails. + if [ -n "$_oomprotect" ] && [ -f "${PROTECT}" ] && + [ "$(sysctl -n security.jail.jailed)" -eq 0 ]; then + pid=$(check_process $command) + case $_oomprotect in + [Aa][Ll][Ll]) + ${PROTECT} -i -p ${pid} + ;; + [Yy][Ee][Ss]) + ${PROTECT} -p ${pid} + ;; + esac fi ;; esac |