summaryrefslogtreecommitdiffstats
path: root/etc/rc.shutdown
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2013-05-19 04:10:34 +0000
committerjamie <jamie@FreeBSD.org>2013-05-19 04:10:34 +0000
commit7941fefd80009514446ab99f32ddfd03121d225b (patch)
tree75f092c389fa19cc71a84d757fa9671acf2fe9fe /etc/rc.shutdown
parent678597bc5abd3902a84210a703be65ad9c972b5d (diff)
downloadFreeBSD-src-7941fefd80009514446ab99f32ddfd03121d225b.zip
FreeBSD-src-7941fefd80009514446ab99f32ddfd03121d225b.tar.gz
Refine the "nojail" rc keyword, adding "nojailvnet" for files that don't
apply to most jails but do apply to vnet jails. This includes adding a new sysctl "security.jail.vnet" to identify vnet jails. PR: conf/149050 Submitted by: mdodd MFC after: 3 days
Diffstat (limited to 'etc/rc.shutdown')
-rw-r--r--etc/rc.shutdown7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/rc.shutdown b/etc/rc.shutdown
index 81cc994..a0dd698 100644
--- a/etc/rc.shutdown
+++ b/etc/rc.shutdown
@@ -81,7 +81,12 @@ fi
# and perform the operation
#
rcorder_opts="-k shutdown"
-[ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && rcorder_opts="$rcorder_opts -s nojail"
+if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
+ rcorder_opts="$rcorder_opts -s nojail"
+ if [ `/sbin/sysctl -n security.jail.vnet` -ne 1 ]; then
+ rcorder_opts="$rcorder_opts -s nojailvnet"
+ fi
+fi
case ${local_startup} in
[Nn][Oo] | '') ;;
OpenPOWER on IntegriCloud