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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to