]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxc-start-ephemeral: Use attach
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Feb 2014 17:42:21 +0000 (12:42 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Feb 2014 19:13:49 +0000 (14:13 -0500)
commit8158c057dc25a50d2918e6dccf9d348e1dd5da22
treefd6aced7471a5a46f1f525c773c4a8f097a6a16a
parent5693029730eeb9e51f3be2f80d3dcff21cade334
lxc-start-ephemeral: Use attach

With this change, systems that support it will use attach to run any
provided command.

This doesn't change the default behaviour of attaching to tty1, but it
does make it much easier to script or even get a quick shell with:
lxc-start-ephemeral -o p1 -n p2 -- /bin/bash

I'm doing the setgid,initgroups,setuid,setenv magic in python rather
than using the attach_wait parameters as I need access to the pwd module
in the target namespace to grab the required information.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc-start-ephemeral.in