From: Serge Hallyn Date: Thu, 16 May 2013 13:22:41 +0000 (-0500) Subject: document clone hooks X-Git-Tag: lxc-1.0.0.alpha1~1^2~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc92f6c7eec81dc104b3f7873ffd74ec56a1dae1;p=thirdparty%2Flxc.git document clone hooks Signed-off-by: Serge Hallyn --- diff --git a/doc/lxc-clone.sgml.in b/doc/lxc-clone.sgml.in index 3ad769880..2d2fda328 100644 --- a/doc/lxc-clone.sgml.in +++ b/doc/lxc-clone.sgml.in @@ -60,6 +60,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -P newlxcpath -o orig -n new + -- hook arguments lxc-clone @@ -73,6 +74,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -P newlxcpath orig new + -- hook arguments @@ -242,6 +244,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Clone hook + + If the container being cloned has one or more lxc.hook.clone + 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 + lxc-clone will be passed to the hook program starting at + argument 4. The LXC_ROOTFS_MOUNT environment variable gives + the path under which the container's root filesystem is mounted. The + configuration file pathname is stored in LXC_CONFIG_FILE, the + container name in LXC_NAME, and the path or device on which + the rootfs is located is in LXC_ROOTFS_PATH. + + + &seealso; diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in index 509ca2df0..af8663add 100644 --- a/doc/lxc.conf.sgml.in +++ b/doc/lxc.conf.sgml.in @@ -770,9 +770,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Startup hooks + Container hooks - 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. @@ -866,10 +866,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + + + + + A hook to be run when the container is cloned to a new one. + See lxc-clone + 1 for more information. + + + + - Startup hooks Environment Variables + Container hooks Environment Variables A number of environment variables are made available to the startup hooks to provide configuration information and assist in the