Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>
---
 doc/lxc.conf.sgml.in | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in
index 6500e50..02667fc 100644
--- a/doc/lxc.conf.sgml.in
+++ b/doc/lxc.conf.sgml.in
@@ -862,6 +862,27 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
02111-1307 USA
        at various times in a container's lifetime.
       </para>
       <para>
+        When a container hook is executed, information is passed both
+       as command line arguments and through environment variables.
+       The arguments are:
+       <itemizedlist>
+         <listitem> Container name. </listitem>
+         <listitem> Section (always 'lxc'). </listitem>
+         <listitem> The hook type (i.e. 'clone' or 'pre-mount'). </listitem>
+         <listitem> Additional arguments In the
+         case of the clone hook, any extra arguments passed to
+         lxc-clone will appear as further arguments to the hook. </listitem> 
+       </itemizedlist>
+       The following environment variables are set:
+       <itemizedlist>
+         <listitem> LXC_NAME: is the container's name. </listitem>
+         <listitem> LXC_ROOTFS_MOUNT: the path to the mounted root filesystem. 
</listitem>
+         <listitem> LXC_CONFIG_FILE: the path to the container configuration 
file. </listitem>
+         <listitem> LXC_SRC_NAME: in the case of the clone hook, this is the 
original container's name. </listitem>
+         <listitem> LXC_ROOTFS_PATH: this is the lxc.rootfs enty for the 
container.  Note this is likely not where the mounted rootfs is to be found, 
use LXC_ROOTFS_MOUNT for that. </listitem>
+       </itemizedlist>
+      </para>
+      <para>
         Standard output from the hooks is logged at debug level.
         Standard error is not logged, but can be captured by the
         hook redirecting its standard error to standard output.
-- 
1.8.1.2


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to