How to execute commands in internal zones of solaris using python running from the global zone ?
ironfroggy at gmail.com
Mon Aug 11 16:42:49 CEST 2008
You might try subprocess, first of all. Use it to launch zlogin and
then treat it like a shell and write 'zonename\n' to its stdin, to
simulate running it as a user. This is a good bet, but I don't have
either available to try it. The subprocess documentation covers
invoking a process and writing to its input.
What you are doing now doesn't work, because you just invoke the two
processes and dont do anything with either of them. zlogin may not
have even completely initialized when you start the second command.
The technique you need is to start zlogin and then tell it to run the
On Mon, Aug 11, 2008 at 6:39 AM, Hishaam <hishaam.ab at gmail.com> wrote:
> How to execute commands in internal zones of solaris using python
> running from the global zone ?
> i tried --
> 1> os.popen("zlogin <zone1>")
> 2> os.popen("zonename")
> the 2nd command executes back into the global zone and not into the
> internal zone
> can anyone help?
Read my blog! I depend on your acceptance of my opinion! I am interesting!
More information about the Python-list