[lxc-devel] [PATCH] Remove MAKEDEV call, add autodev hooks, add environment variables for hook scripts.
Ward, David - 0663 - MITLL
david.ward at ll.mit.edu
Tue Mar 12 17:19:42 UTC 2013
Michael, Serge,
On 01/09/2013 03:38 PM, Michael H. Warfield wrote:
> 4) clearenv and putenv( "container=lxc" ) calls were moved to just after
> the "start" hook in the container just prior to actually firing up the
> container so we could use environment variables prior to that and have
> them flushed them before firing up init. Nice side effect is that you
> can define environment variables and then call lxc-start and have them
> show up in those hooks scripts.
Since the call to clearenv() was moved to do_start(), it also gets
called when running lxc-execute. If I set up a very simple container
with only utsname/network namespaces, and do:
lxc-execute -n $CONTAINER -- bash
then the PATH and HOME environment variables are no longer propagated
into new shell, for example. (In Fedora at least, these environment
variables are set in /etc/profile, which does not get sourced by
/etc/bashrc or ~/.bashrc by default.)
Is this the desired behavior for lxc-execute now, or was it an
unintended side-effect? Also keep in mind that if I do:
lxc-attach -n $CONTAINER -- bash
the environment variables are not cleared there before opening the shell
(regardless of whether the container was started with lxc-start or
lxc-execute)...this may need to be adjusted.
Thanks,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4571 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130312/a0d9abd5/attachment.bin>
More information about the lxc-devel
mailing list