> os.chdir("/") immediately afterwards. In any case, it's worth a try.
> ChrisA
Very thanks. the trick worked.
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Nov 14, 2013 at 8:29 PM, Himanshu Garg wrote:
> I have written a script
>
> os.chroot("/lxc/test_container/rootfs")
> subprocess.call(["apt-key", "add", "/root/package.key"])
> subprocess.call(["apt-get", "update"])
>
> os._exit(0)
>
> Now, this script is working properly, entering the chr
I have done it but having a problem.
I have written a script
os.chroot("/lxc/test_container/rootfs")
subprocess.call(["apt-key", "add", "/root/package.key"])
subprocess.call(["apt-get", "update"])
os._exit(0)
Now, this script is working properly, entering the chroot jail and adding the
apt key
On Thu, Nov 14, 2013 at 1:12 PM, Steven D'Aprano
wrote:
> The next bit is the part I have no idea about... use your operating
> system tools to set up a chroot jail for "inside.py". Google is your
> friend there, I'm sure there will be many, many websites that discuss
> chroot jails.
I think Pyth
On Wed, 13 Nov 2013 17:52:42 -0800, Himanshu Garg wrote:
> On Thursday, November 14, 2013 5:10:20 AM UTC+5:30, Chris Angelico
> wrote:
>> On Thu, Nov 14, 2013 at 1:31 AM, Himanshu Garg
>> wrote:
>>
>> > I am writing a python script to run chroot command to chroot to a
>> > linux distro and then
On Thu, Nov 14, 2013 at 12:52 PM, Himanshu Garg wrote:
> How can I do that? Can you guide me?
First off: Google Groups is making your posts very ugly. Please either
fix them before posting, or use a better client.
https://wiki.python.org/moin/GoogleGroupsPython
As to chrooting: It'd look somet
On Thursday, November 14, 2013 5:10:20 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Nov 14, 2013 at 1:31 AM, Himanshu Garg wrote:
>
> > I am writing a python script to run chroot command to chroot to a linux
> > distro and then run commands. How can I do this, as after chrooting, the
> > scrip
On Thu, Nov 14, 2013 at 1:31 AM, Himanshu Garg wrote:
> I am writing a python script to run chroot command to chroot to a linux
> distro and then run commands. How can I do this, as after chrooting, the
> script runs the commands relative to the outside not inside the chrooted env?
Probably th
I am writing a python script to run chroot command to chroot to a linux distro
and then run commands. How can I do this, as after chrooting, the script runs
the commands relative to the outside not inside the chrooted env?
--
https://mail.python.org/mailman/listinfo/python-list