svn commit: r46732 - head/en_US.ISO8859-1/books/handbook/jails

Allan Jude allanjude at
Fri May 29 20:02:36 UTC 2015

Author: allanjude
Date: Fri May 29 20:02:35 2015
New Revision: 46732

  Update instructions for manually creating a jail
  Remove unneeded subshell
  Remove csh examples, and explicitly use sh everywhere
  Remove the GAMES set which on longer exists
  Remove the DOCS set that may be removed in the future, it is not needed inside a jail
  PR:		194993
  Differential Revision:
  Submitted by:	alex at (original)
  Reviewed by:	wblock
  Approved by:	bcr (mentor)
  Sponsored by:	ScaleEngine Inc.


Modified: head/en_US.ISO8859-1/books/handbook/jails/chapter.xml
--- head/en_US.ISO8859-1/books/handbook/jails/chapter.xml	Fri May 29 17:15:55 2015	(r46731)
+++ head/en_US.ISO8859-1/books/handbook/jails/chapter.xml	Fri May 29 20:02:35 2015	(r46732)
@@ -205,17 +205,12 @@
     <para>To install the userland from installation media, first
       create the root directory for the jail.  This can be done by
       setting the <varname>DESTDIR</varname> variable to the proper
-      location.  The command to use depends on which shell is being
-      used.</para>
+      location.</para>
-    <para>When using &;:</para>
+    <para>Start a shell and define <varname>DESTDIR</varname>:</para>
-    <screen>&prompt.root; <userinput>export DESTDIR=<replaceable>/here/is/the/jail</replaceable></userinput></screen>
-    <para>If <command>csh</command>/<command>tcsh</command> is used,
-      execute this instead:</para>
-    <screen>&prompt.root; <userinput>setenv DESTDIR <replaceable>/here/is/the/jail</replaceable></userinput></screen>
+    <screen>&prompt.root; <userinput>sh</userinput>
+&prompt.root; <userinput>export DESTDIR=<replaceable>/here/is/the/jail</replaceable></userinput></screen>
     <para>Mount the install media as covered in &man.mdconfig.8;
       when using the install ISO:</para>
@@ -236,31 +231,17 @@
     <screen>&prompt.root; <userinput>/mnt/8.<replaceable>4</replaceable>-RELEASE/base/</userinput></screen>
-    <para>To install everything but the kernel, issue this
-      command:</para>
+    <para>To install everything except the kernel, issue one of these
+      commands:</para>
-    <para>When using &; on &os; 9.x and newer, issue this
-      command:</para>
+    <para>When using &os; 9.x and newer:</para>
-    <screen>&prompt.root; <userinput>for <replaceable>sets</replaceable> in BASE DOC GAMES PORTS; do (tar -xf /mnt/FREEBSD_INSTALL/USR/FREEBSD_DIST/$<replaceable>sets</replaceable>.TXZ -C $DESTDIR) ; done</userinput></screen>
+    <screen>&prompt.root; <userinput>for <replaceable>sets</replaceable> in BASE PORTS; do tar -xf /mnt/FREEBSD_INSTALL/USR/FREEBSD_DIST/$<replaceable>sets</replaceable>.TXZ -C $DESTDIR ; done</userinput></screen>
-    <para>When using &os; 8.x, run this:</para>
+    <para>When using &os; 8.x:</para>
     <screen>&prompt.root; <userinput>cd /mnt/8.<replaceable>4</replaceable>-RELEASE; for <replaceable>dir</replaceable> in base catpages dict doc games info manpages ports; do (cd $<replaceable>dir</replaceable>; ./ ; done</userinput></screen>
-    <para>If <command>csh</command>/<command>tcsh</command> is used on
-      &os; 9.x and newer, execute this command:</para>
-    <screen>&prompt.root; <userinput>foreach <replaceable>sets</replaceable> ( BASE DOC GAMES PORTS )
-    <para>On &os; 8.x, run this command:</para>
-    <screen>&prompt.root; <userinput>foreach <replaceable>dir</replaceable> ( base catpages dict doc games info manpages ports )
-	cd /mnt/8.<replaceable>4</replaceable>-RELEASE/$dir; ./
     <para>The &man.jail.8; manual page explains the procedure for
       building a jail:</para>
@@ -390,14 +371,14 @@ jail_<replaceable>www</replaceable>_devf
     <screen>&prompt.root; <userinput>service jail start <replaceable>www</replaceable></userinput>
 &prompt.root; <userinput>service jail stop <replaceable>www</replaceable></userinput></screen>
-    <para>A clean way to shut down a &man.jail.8; is not available at
-      the moment.  This is because commands normally used to
-      accomplish a clean system shutdown cannot be used inside a jail.
-      The best way to shut down a jail is to run the following command
-      from within the jail itself or using the &man.jexec.8; utility
-      from outside the jail:</para>
+    <para>Jails can be shut down with &man.jexec.8;.  Use &man.jls.8;
+      to identify the jail's <varname>JID</varname>, then use
+      &man.jexec.8; to run the shutdown script in that jail.</para>
-    <screen>&prompt.root; <userinput>sh /etc/rc.shutdown</userinput></screen>
+    <screen>&prompt.root; <userinput>jls</userinput>
+   JID  IP Address      Hostname                      Path
+     3    www                           /usr/jail/www
+&prompt.root; <userinput>jexec <replaceable>3</replaceable> /etc/rc.shutdown</userinput></screen>
     <para>More information about this can be found in the &man.jail.8;
       manual page.</para>

More information about the svn-doc-all mailing list