Re: Name and JID support in /etc/rc.d/jail and jail(8) documentation
Hi All, Created a small patch for 8.1 to add name support to /etc/rc.d/jail. This doesn't upgrade /etc/rc.d/jail to the overhauled invocation of 8.0 but merely adds the ability to set a jail's name on start which was added in FreeBSD 7.2 (May 2009). Could this patch be considered to be applied to stable? # diff -ruN /etc/rc.d/jail-8.1 /etc/rc.d/jail --- /etc/rc.d/jail-8.1 2010-07-21 07:19:46.0 +0200 +++ /etc/rc.d/jail 2010-10-24 10:55:14.0 +0200 @@ -38,6 +38,7 @@ _fdescdir="${_devdir}/fd" _procdir="${_rootdir}/proc" eval _hostname=\"\$jail_${_j}_hostname\" + eval _name=\"\$jail_${_j}_name\" eval _ip=\"\$jail_${_j}_ip\" eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\" eval _exec=\"\$jail_${_j}_exec\" @@ -122,6 +123,7 @@ debug "$_j procfs enable: $_procfs" debug "$_j mount enable: $_mount" debug "$_j hostname: $_hostname" + debug "$_j name: $_name" debug "$_j ip: $_ip" jail_show_addresses ${_j} debug "$_j interface: $_interface" @@ -635,6 +637,10 @@ i=$((i + 1)) done + if [ -n "${_name}" ] ; then + _flags="${_flags} -n ${_name}" + fi + eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 Kind regards, Spil. On Sun, Oct 24, 2010 at 10:52 AM, Spil Oss wrote: > Hi All, > > When starting a jail you can, as of 8.0 if I'm not mistaken, set the > JID and name for a jail. This change doesn't seem to have been > incorporated into the /etc/rc.d/jail script? Looking at > http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet it wouldn't > be a huge change to add name support. The other additions in that > script look a lot more intrusive. Are there any plans to merge this > patch into the jail rc-script or is this "v2" style of jail invocation > still considered to be experimental? As of 8.1 is seems to no longer > be considered experimental looking at the release notes. > > The jail(8) documentation (mine lists FreeBSD 8.1 January 17, 2010) > seems to be missing documentation on the vnet command (due to the > experimental status)? > > Kind regards, > > Spil. > ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Name and JID support in /etc/rc.d/jail and jail(8) documentation
Hi All, When starting a jail you can, as of 8.0 if I'm not mistaken, set the JID and name for a jail. This change doesn't seem to have been incorporated into the /etc/rc.d/jail script? Looking at http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet it wouldn't be a huge change to add name support. The other additions in that script look a lot more intrusive. Are there any plans to merge this patch into the jail rc-script or is this "v2" style of jail invocation still considered to be experimental? As of 8.1 is seems to no longer be considered experimental looking at the release notes. The jail(8) documentation (mine lists FreeBSD 8.1 January 17, 2010) seems to be missing documentation on the vnet command (due to the experimental status)? Kind regards, Spil. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Name and JID support in /etc/rc.d/jail and jail(8) documentation
Spil Oss wrote: Hi All, Created a small patch for 8.1 to add name support to /etc/rc.d/jail. This doesn't upgrade /etc/rc.d/jail to the overhauled invocation of 8.0 but merely adds the ability to set a jail's name on start which was added in FreeBSD 7.2 (May 2009). Could this patch be considered to be applied to stable? [...] I don't think it will be committed. I talked about it in March 2009 and bz said: "I think there is no need to add anything..." "For jail names just add -n name to jail__flags" http://lists.freebsd.org/pipermail/freebsd-jail/2009-March/000751.html Miroslav Lachman ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Name and JID support in /etc/rc.d/jail and jail(8) documentation
On Sun, 24 Oct 2010, Spil Oss wrote: Hi, Created a small patch for 8.1 to add name support to /etc/rc.d/jail. This doesn't upgrade /etc/rc.d/jail to the overhauled invocation of 8.0 but merely adds the ability to set a jail's name on start which was added in FreeBSD 7.2 (May 2009). Could this patch be considered to be applied to stable? # diff -ruN /etc/rc.d/jail-8.1 /etc/rc.d/jail [snip] short answer: no 1) add -n to the defaults of jail__flags in rc.conf and be done just now. No need for a new variable. 2) you want to follow the new jail management on the freebsd-jail list. I would expect that there will just be no further changes to the rc script unless security related ones. On Sun, Oct 24, 2010 at 10:52 AM, Spil Oss wrote: Hi All, When starting a jail you can, as of 8.0 if I'm not mistaken, set the JID and name for a jail. This change doesn't seem to have been incorporated into the /etc/rc.d/jail script? Looking at http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet it wouldn't be a huge change to add name support. The other additions in that script look a lot more intrusive. Are there any plans to merge this patch into the jail rc-script or is this "v2" style of jail invocation still considered to be experimental? As of 8.1 is seems to no longer be considered experimental looking at the release notes. The new style version was never considered "experimental". It wasn't just not advertised that much due to the lack of 2) above. The jail(8) documentation (mine lists FreeBSD 8.1 January 17, 2010) seems to be missing documentation on the vnet command (due to the experimental status)? Right, vnets are still considered experimental. /bz -- Bjoern A. Zeeb Welcome a new stage of life. Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"