From 49ee6cdcbf79d8b6fa617479ec8ab753ccca923d Mon Sep 17 00:00:00 2001 From: Christian Seiler Date: Thu, 23 Feb 2012 09:57:14 +0100 Subject: Add man page for lxc-attach Signed-off-by: Daniel Lezcano --- configure.ac | 1 + doc/Makefile.am | 1 + doc/lxc-attach.sgml.in | 189 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/see_also.sgml.in | 5 ++ 4 files changed, 196 insertions(+) create mode 100644 doc/lxc-attach.sgml.in diff --git a/configure.ac b/configure.ac index 02f652b..f43dc07 100644 --- a/configure.ac +++ b/configure.ac @@ -120,6 +120,7 @@ AC_CONFIG_FILES([ doc/lxc-ps.sgml doc/lxc-cgroup.sgml doc/lxc-kill.sgml + doc/lxc-attach.sgml doc/lxc.conf.sgml doc/lxc.sgml doc/common_options.sgml diff --git a/doc/Makefile.am b/doc/Makefile.am index 8530ee9..b18c5eb 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -23,6 +23,7 @@ man_MANS = \ lxc-ps.1 \ lxc-cgroup.1 \ lxc-kill.1 \ + lxc-attach.1 \ \ lxc.conf.5 \ \ diff --git a/doc/lxc-attach.sgml.in b/doc/lxc-attach.sgml.in new file mode 100644 index 0000000..6ae6f03 --- /dev/null +++ b/doc/lxc-attach.sgml.in @@ -0,0 +1,189 @@ + + + + +]> + + + + @LXC_GENERATE_DATE@ + + + lxc-attach + 1 + + + + lxc-attach + + + start a process inside a running container. + + + + + lxc-attach -n + name -a + arch -e + -- command + + + + Description + + + lxc-attach runs the specified + command inside the container + specified by name. The container + has to be running already. + + + If no command is specified, the + current default shell of the user running + lxc-attach will be looked up inside the + container and executed. This will fail if no such user exists + inside the container or the container does not have a working + nsswitch mechanism. + + + + + + + Options + + + + + + + + + + Specify the architecture which the kernel should appear to be + running as to the command executed. This option will accept the + same settings as the option in + container configuration files, see + + lxc.conf + 5 + . By default, the current archictecture of the + running container will be used. + + + + + + + + + + + Do not drop privileges when running + command inside the container. If + this option is specified, the new process will + not be added to the container's cgroup(s) + and it will not drop its capabilities before executing. + + + Warning: This may leak privileges into the + container if the command starts subprocesses that remain active + after the main process that was attached is terminated. The + (re-)starting of daemons inside the container is problematic, + especially if the daemon starts a lot of subprocesses such as + cron or sshd. + Use with great care. + + + + + + + + + &commonoptions; + + + Examples + + To spawn a new shell running inside an existing container, use + + lxc-attach -n container + + + + To restart the cron service of a running Debian container, use + + lxc-attach -n container -- /etc/init.d/cron restart + + + + To deactivate the network link eth1 of a running container that + does not have the NET_ADMIN capability, use the + option to use increased capabilities: + + lxc-attach -n container -e -- /sbin/ip link delete eth1 + + + + + + + + Security + + The should be used with care, as it may break + the isolation of the containers if used improperly. + + + + &seealso; + + + Author + Daniel Lezcano daniel.lezcano@free.fr + + + + + diff --git a/doc/see_also.sgml.in b/doc/see_also.sgml.in index 78b99b4..e400e8b 100644 --- a/doc/see_also.sgml.in +++ b/doc/see_also.sgml.in @@ -107,6 +107,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1 , + + lxc-attach + 1 + , + lxc.conf 5 -- cgit v1.2.3-65-gdbad