diff options
author | pjd <pjd@FreeBSD.org> | 2005-06-26 16:30:20 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-06-26 16:30:20 +0000 |
commit | 573c1a10201fed9f95880691f90de7ade6ee0d48 (patch) | |
tree | b27a9c9a845a5b737556a2e08ba9e22f28213a94 /etc/rc.d | |
parent | 77c5d7a36d189d1c4f1b1d55847443a0cc46a001 (diff) | |
download | FreeBSD-src-573c1a10201fed9f95880691f90de7ade6ee0d48.zip FreeBSD-src-573c1a10201fed9f95880691f90de7ade6ee0d48.tar.gz |
Introduce new per-jail variable jail_<name>_flags, which allows to specify
jail(8) flags (before the change we had hardcoded "-l -U root").
Submitted by: Frank Behrens <frank@pinky.sax.de>
PR: conf/80244
Approved by: re (scottl)
MFC after: 1 week
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/jail | 5 |
1 files changed, 4 insertions, 1 deletions
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}) |