summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-12-05 15:52:27 -0200
committerRenato Botelho <renato@netgate.com>2016-12-05 15:52:27 -0200
commitec84a59afa973e7e021ba2ae8ecae4cb6ba37b1d (patch)
treed7d40ac77bda3d6fc35814a1a6484eb324b3c7df /etc
parentca825f0a56d174ca9d3478d87cdca9f318a50cc6 (diff)
parent356fbc072920d7e71c42b310d6bfa2d1a3d36f9f (diff)
downloadFreeBSD-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.dist2
-rwxr-xr-xetc/rc.d/swaplate2
-rw-r--r--etc/rc.subr24
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
OpenPOWER on IntegriCloud