Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2014 08:24:43 +0100
From:      Jack-Benny Persson <jack-benny@cyberinfo.se>
To:        freebsd-doc@freebsd.org
Subject:   Re: Patch to FreeBSD Handbook - jails
Message-ID:  <531039BB.4020004@cyberinfo.se>
In-Reply-To: <530F301B.7030101@cyberinfo.se>
References:  <530F301B.7030101@cyberinfo.se>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060707080707080806070201
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi again,

I've changed my patch a bit since I'm figured it was a bad idea to
remove the "old way" (keeping the jail settings in /etc/rc.conf) since
/etc/jail.conf is rather new (from FreeBSD 9.1 and above).

Included here is my new patch for the jail chapter in the Handbook.

Best regards,
Jack-Benny



On 2014-02-27 13:31, Jack-Benny Persson wrote:
> Hi,
> 
> I've noticed that the Jails chapter in the Handbook is a bit out of
> date. The handbook says one should place the jail_* config options in
> the /etc/rc.conf file but this is deprecated. The config options should
> now be placed in /etc/jail.conf.
> 
> I've created a SVN patch here with an update.
> 
> Best regards,
> Jack-Benny Persson
> 
> 
> 
> _______________________________________________
> freebsd-doc@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-doc
> To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org"
> 

--------------060707080707080806070201
Content-Type: text/plain; charset=UTF-8;
 name="jails.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="jails.txt"

Index: en_US.ISO8859-1/books/handbook/jails/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/handbook/jails/chapter.xml	(revision 44074)
+++ en_US.ISO8859-1/books/handbook/jails/chapter.xml	(working copy)
@@ -373,6 +373,25 @@
 	  <para>For a full list of available options, please see the
 	    &man.rc.conf.5; manual page.</para>
 	</note>
+
+<note>
+<para>From FreeBSD 9.1 and above the recommended way is to place the jail settings in <filename>/etc/jail.conf</filename> (see &man.jail.conf.5;).
+For example a jail config similar to above would look like this in <filename>/etc/jail.conf</filename>.
+<programlisting>
+<replaceable>www</replaceable> {                                        # Name of the jail from jail_list in /etc/rc.conf
+     host.hostname = <replaceable>www</replaceable>.example.org;        # Hostname
+     ip4.addr =	192.168.0.10;                # IP address of the jail
+     path = "<replaceable>/usr/jail/www</replaceable>";                 # Path to the jail
+     devfs_ruleset = <replaceable>www_ruleset</replaceable>;            # DevFS ruleset
+     mount.devfs;                            # Mount devfs inside the jail
+     exec.start = "/bin/sh /etc/rc";         # Start command to run
+     exec.stop = "/bin/sh /etc/rc.shutdown"; # Stop command to run to stop the jail
+}
+</programlisting>
+</para>
+</note>
+
+
       </step>
     </procedure>
 

--------------060707080707080806070201--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?531039BB.4020004>