Show banner on lxc-attach

lxc

(Vasili Korol) #1

Hi!
I would like to show a banner whenever one attaches to one particular privileged container's console using lxc-attach. Is this possible to implement somehow? It seems like none of /etc/profile or ~/.bashrc are actually used by lxc-attach.


(St├ęphane Graber) #2

You want:

lxc-attach -n NAME -- login -f root

(Vasili Korol) #3

Yes, but then all developers who have access to privileged containers will have to type that every time. I thought there was a way to do smth like that without starting the login shell explicitly. I guess, the only solution for me is to make a wrapper script for lxc-attach...