Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2015 20:02:35 +0000 (UTC)
From:      Allan Jude <allanjude@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r46732 - head/en_US.ISO8859-1/books/handbook/jails
Message-ID:  <201505292002.t4TK2Z2A064882@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: allanjude
Date: Fri May 29 20:02:35 2015
New Revision: 46732
URL: https://svnweb.freebsd.org/changeset/doc/46732

Log:
  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:	https://reviews.freebsd.org/D2116
  Submitted by:	alex@kaworu.ch (original)
  Reviewed by:	wblock
  Approved by:	bcr (mentor)
  Sponsored by:	ScaleEngine Inc.

Modified:
  head/en_US.ISO8859-1/books/handbook/jails/chapter.xml

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 &man.sh.1;:</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/install.sh</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 &man.sh.1; on &os;&nbsp;9.x and newer, issue this
-      command:</para>
+    <para>When using &os;&nbsp;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;&nbsp;8.x, run this:</para>
+    <para>When using &os;&nbsp;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>; ./install.sh) ; 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 )
-tar -xf /mnt/FREEBSD_INSTALL/USR/FREEBSD_DIST/$sets.TXZ -C $DESTDIR
-done</userinput></screen>
-
-    <para>On &os;&nbsp;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; ./install.sh
-done</userinput></screen>
-
     <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  192.168.0.10    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>



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