OpenVZ Forum


Home » General » Support » what sripts runs when you vzctl into a ve?
Re: what sripts runs when you vzctl into a ve? [message #718 is a reply to message #709] Sat, 07 January 2006 13:16 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Below is the excerpt from vzctl sources, file src/enter.c. You can see that all environment variables and their values are hardcoded.

If you want your normal environment, you should ssh to your VPS as you would do with a normal remote server -- vzctl enter is designed to be used as a "last resort" or "quick and dirty way of accessing your VPS".

char *arg[] = {"bash",  "--login", "-i", NULL};
char *env[] = {"HOME=/", "HISTFILE=/dev/null",
               "PATH=/bin:/sbin:/usr/bin:/usr/sbin:", NULL, NULL};
...
if ((term = getenv("TERM")) != NULL) {
   snprintf(buf, sizeof(buf), "TERM=%s", term);
   env[2] = buf;
}


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Previous Topic: CentOS Disk space usage (df command) output is empty
Next Topic: How to properly set memory limits
Goto Forum:
  


Current Time: Sun Jul 21 22:16:13 GMT 2024

Total time taken to generate the page: 0.02322 seconds