OpenVZ Forum


Home » General » Support » vzctle exec 'command' extend path
vzctle exec 'command' extend path [message #34370] Thu, 25 December 2008 11:47 Go to next message
michaelvv is currently offline  michaelvv
Messages: 7
Registered: October 2008
Junior Member
Hi OpenVz.

I have made a script for installing openvz vps , from the HOST OS.

but when i am compiling a bash script on the VPS from the HOST OS
using the vzctl exec command it can not find a certain file because it isn't located in its PATH.

vzctl exec 113 'which mysql_config'

which: no mysql_config in (/bin:/sbin:/usr/bin:/usr/sbin:.)

is it possible to add the directory where in this case 'mysql_config' is located , so i still can run my install
script from my HOST OS with an exec 'command'...

It works fine when i'm logged into the 113 VPS...

Thanks

/Michael





Re: vzctle exec 'command' extend path [message #34371 is a reply to message #34370] Thu, 25 December 2008 13:16 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

try :

$ vzctl exec <CTID> 'export PATH=<_YOUR_PATH_SETTING_>:$PATH; which mysql_config'

Bye,
Thorsten
Re: vzctle exec 'command' extend path [message #34373 is a reply to message #34371] Thu, 25 December 2008 21:07 Go to previous message
michaelvv is currently offline  michaelvv
Messages: 7
Registered: October 2008
Junior Member
Hi Thorsten

Thanks a lot...

/Michael
Previous Topic: OpenVZ kernel running under XEN
Next Topic: Making a VE use a particular cpu
Goto Forum:
  


Current Time: Thu Apr 25 15:02:30 GMT 2024

Total time taken to generate the page: 0.01593 seconds