Commit dc92f6c7 by Serge Hallyn

document clone hooks

parent 148e91f5
...@@ -60,6 +60,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -60,6 +60,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<arg choice="opt">-P <replaceable>newlxcpath</replaceable></arg> <arg choice="opt">-P <replaceable>newlxcpath</replaceable></arg>
<arg choice="req">-o <replaceable>orig</replaceable></arg> <arg choice="req">-o <replaceable>orig</replaceable></arg>
<arg choice="req">-n <replaceable>new</replaceable></arg> <arg choice="req">-n <replaceable>new</replaceable></arg>
<arg choice="opt">-- hook arguments</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>lxc-clone</command> <command>lxc-clone</command>
...@@ -73,6 +74,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -73,6 +74,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<arg choice="opt">-P <replaceable>newlxcpath</replaceable></arg> <arg choice="opt">-P <replaceable>newlxcpath</replaceable></arg>
<arg choice="req">orig</arg> <arg choice="req">orig</arg>
<arg choice="req">new</arg> <arg choice="req">new</arg>
<arg choice="opt">-- hook arguments</arg>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
...@@ -242,6 +244,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -242,6 +244,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</refsect1> </refsect1>
<refsect1>
<title>Clone hook</title>
<para>
If the container being cloned has one or more <filename>lxc.hook.clone</filename>
specified, then the specified hooks will be called for the new container. The
first 3 arguments passed to the clone hook will be the container name, a section
('lxc'), and the hook type ('clone'). Extra arguments passed
<command>lxc-clone</command> will be passed to the hook program starting at
argument 4. The <filename>LXC_ROOTFS_MOUNT</filename> environment variable gives
the path under which the container's root filesystem is mounted. The
configuration file pathname is stored in <filename>LXC_CONFIG_FILE</filename>, the
container name in <filename>LXC_NAME</filename>, and the path or device on which
the rootfs is located is in <filename>LXC_ROOTFS_PATH</filename>.
</para>
</refsect1>
&seealso; &seealso;
<refsect1> <refsect1>
......
...@@ -770,9 +770,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -770,9 +770,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Startup hooks</title> <title>Container hooks</title>
<para> <para>
Startup hooks are programs or scripts which can be executed Container hooks are programs or scripts which can be executed
at various times in a container's lifetime. at various times in a container's lifetime.
</para> </para>
<variablelist> <variablelist>
...@@ -866,10 +866,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -866,10 +866,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<variablelist>
<varlistentry>
<term>
<option>lxc.hook.clone</option>
</term>
<listitem>
<para>
A hook to be run when the container is cloned to a new one.
See <refentrytitle><command>lxc-clone</command></refentrytitle>
<manvolnum>1</manvolnum> for more information.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Startup hooks Environment Variables</title> <title>Container hooks Environment Variables</title>
<para> <para>
A number of environment variables are made available to the startup A number of environment variables are made available to the startup
hooks to provide configuration information and assist in the hooks to provide configuration information and assist in the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment