]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
document the stop hook
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 6 Oct 2015 08:01:06 +0000 (10:01 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 7 Oct 2015 15:38:12 +0000 (16:38 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
doc/lxc.container.conf.sgml.in

index f81649113bb0b20eca9e364d48734bd8756d0ab2..90ffefa3c3d9f7262324d4baaf89525567cfa700 100644 (file)
@@ -1312,9 +1312,12 @@ mknod errno 0
           <listitem><para> Container name. </para></listitem>
           <listitem><para> Section (always 'lxc'). </para></listitem>
           <listitem><para> The hook type (i.e. 'clone' or 'pre-mount'). </para></listitem>
-          <listitem><para> Additional arguments In the
+          <listitem><para> Additional arguments. In the
           case of the clone hook, any extra arguments passed to
-          lxc-clone will appear as further arguments to the hook. </para></listitem>
+          lxc-clone will appear as further arguments to the hook.
+          In the case of the stop hook, paths to filedescriptors
+          for each of the container's namespaces along with their types
+          are passed. </para></listitem>
         </itemizedlist>
         The following environment variables are set:
         <itemizedlist>
@@ -1408,6 +1411,26 @@ mknod errno 0
           </listitem>
         </varlistentry>
       </variablelist>
+      <variablelist>
+        <varlistentry>
+          <term>
+            <option>lxc.hook.stop</option>
+          </term>
+          <listitem>
+            <para>
+              A hook to be run in the host's namespace with references
+              to the container's namespaces after the container has been shut
+              down. For each namespace an extra argument is passed to the hook
+              containing the namespace's type and a filename that can be used to
+              obtain a file descriptor to the corresponding namespace, separated
+              by a colon. The type is the name as it would appear in the
+              <filename>/proc/PID/ns</filename> directory.
+              For instance for the mount namespace the argument usually looks
+              like <filename>mnt:/proc/PID/fd/12</filename>.
+            </para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
       <variablelist>
         <varlistentry>
           <term>