[OpenVZ] vzctl enter and env variables

When doing a vzctl enter from an OpenVZ hypervisor you go inside the container but… without any environment variables :

hypervisor:~# vzctl enter container
entered into VE 101
container:/# echo $LANG

container:/# su -
container:~# echo $LANG

You can workaround this ‘problem’ by patching the /root/.bashrc from the container to execute a su - like this :

if [ "$LANG" = "" ]; then
    exec su -