You are not logged in.

#1 2015-03-09 17:37:22

isnull
Member
Registered: 2012-10-30
Posts: 17

[SOLVED] LXC debian template and $PATH

Hi all,

Is there anything I can do to **not** have to source /etc/profile in the container every time I attach ?

$ sudo lxc-attach -n sentry_conf10 
root@sentry_conf10:/# echo $PATH
/home/jpic/perl5/bin:/home/jpic/env/bin:/home/jpic/bin:/home/jpic/.bin:/home/jpic/.rbenv/shims:/home/jpic/perl5/bin:/home/jpic/env/bin:/home/jpic/bin:/home/jpic/.bin:/home/jpic/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/jpic/.local/bin:/home/jpic/bin
root@sentry_conf10:/# source /etc/profile
root@sentry_conf10:/# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@sentry_conf10:/#   # $PATH is ok now !

Thanks in advance !

Last edited by isnull (2015-03-09 17:43:39)

Offline

#2 2015-03-09 17:43:29

isnull
Member
Registered: 2012-10-30
Posts: 17

Re: [SOLVED] LXC debian template and $PATH

Solution: use lxc-attach --clear-env

Offline

Board footer

Powered by FluxBB