summaryrefslogtreecommitdiffstats
path: root/etc/rc.subr
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.subr')
-rw-r--r--etc/rc.subr16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index ff4e898..97b631f 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -1966,6 +1966,22 @@ check_required_after()
return 0
}
+# check_jail mib
+# Return true if security.jail.$mib exists and set to 1.
+
+check_jail()
+{
+ local _mib _v
+
+ _mib=$1
+ if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then
+ case $_v in
+ 1) return 0;;
+ esac
+ fi
+ return 1
+}
+
# check_kern_features mib
# Return existence of kern.features.* sysctl MIB as true or
# false. The result will be cached in $_rc_cache_kern_features_
OpenPOWER on IntegriCloud