summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/rc.conf1
-rw-r--r--etc/rc.d/jail5
2 files changed, 5 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index c794fdd..38d5557 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -515,6 +515,7 @@ jail_sysvipc_allow="NO" # Allow SystemV IPC use from within a jail
#jail_example_mount_enable="NO" # mount/umount jail's fs
#jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail
#jail_example_fstab="" # fstab(5) for mount/umount
+#jail_example_flags="-l -U root" # flags for jail(8)
##############################################################
### Define source_rc_confs, the mechanism used by /etc/rc.* ##
diff --git a/etc/rc.d/jail b/etc/rc.d/jail
index 983ff3b..e9dad2c 100644
--- a/etc/rc.d/jail
+++ b/etc/rc.d/jail
@@ -64,6 +64,8 @@ init_variables()
# "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified.
eval jail_fstab=\"\$jail_${_j}_fstab\"
[ -z "${jail_fstab}" ] && jail_fstab="/etc/fstab.${_j}"
+ eval jail_flags=\"\$jail_${_j}_flags\"
+ [ -z "${jail_flags}" ] && jail_flags="-l -U root"
# Debugging aid
#
@@ -81,6 +83,7 @@ init_variables()
debug "$_j fstab: $jail_fstab"
debug "$_j exec start: $jail_exec_start"
debug "$_j exec stop: $jail_exec_stop"
+ debug "$_j flags: $jail_flags"
}
# set_sysctl rc_knob mib msg
@@ -196,7 +199,7 @@ jail_start()
fi
fi
_tmp_jail=${_tmp_dir}/jail.$$
- eval jail -l -U root -i ${jail_rootdir} ${jail_hostname} \
+ eval jail ${jail_flags} -i ${jail_rootdir} ${jail_hostname} \
${jail_ip} ${jail_exec_start} > ${_tmp_jail} 2>&1
[ "$?" -eq 0 ] && echo -n " $jail_hostname"
_jail_id=$(head -1 ${_tmp_jail})
OpenPOWER on IntegriCloud