You are not logged in.

#1 2009-08-04 07:37:28

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Sand Boxing A Program

Ive been messing around with a stage 2 install script that I wrote and I've noticed that bugs in the script have the possibility to wreak havoc on the installation that I'm testing it in and will force me to reinstall a brand new base system to get things working again (if all else fails I guess I could edit the quick install script and use that each time...).  Is there anyway that I can prevent this from happening?

The only idea I have in my head is to have a static disk image of a fresh arch install in vmware and move the main script from the guest to host before I shut down each time so I have an updated copy of the script. The only problem that I can for see is that vmware tools is needed to enable host/guest sharing but IIRC the vmware tools installation needs a GUI to work correctly but I would only have the CLI available.

Offline

#2 2009-08-04 07:45:11

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Sand Boxing A Program

You can make a virtual-disk link to your physical drive.  Then you don't need the tools at all.

Last edited by Wintervenom (2009-08-04 07:57:08)

Offline

#3 2009-08-04 08:52:25

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Sand Boxing A Program

cool, how would I go about doing that?

Offline

#4 2009-08-06 17:39:13

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Sand Boxing A Program

*bump*

Offline

#5 2009-08-06 18:04:17

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Sand Boxing A Program

Try it with a chroot environment, if the script is not deliberately trying to fuck up your system that should be sufficient.

My first guess would be more or less the following (assuming you use lvm):
copy a clean arch install to a logical volume, then
while debugging:
make a snapshot, chroot into the snapshot, do your testing, delete the snapshot

/edit
if you don't want to use lvm you can use chroot anyways:
create a clean arch install in $sourcedir
while testing:
copy $sourcedir to $testdir, chroot into $testdir, do your testing, delete $testdir

Last edited by raf_kig (2009-08-06 18:06:55)

Offline

#6 2009-08-07 04:46:19

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Sand Boxing A Program

I dont use lvm and I dont know why I never though about using a chroot environment, thanks.

Offline

Board footer

Powered by FluxBB