On Tue, Jan 15, 2008 at 01:33:44PM +1100, Adam Kennedy wrote:
> Hi folks
> 
> I'm working on an open source virtualized automated testing system (see
> http://pitatesting.org/ or http://search.cpan.org/perldoc?PITA for details)
> and I need some advice on hacking a simple linux install to create a very
> specific behaviour.
> 
> Starting with a basic headless server install of debian stable in a qemu
> image, at boot time I need the machine to start up, mount a secondary
> drive/cd-image containing the testing payload at /mnt/payload, and then
> launch a specific script (lets call it /opt/pita/foo). All services such as
> networking, any mail servers or databases etc should start as normal before
> /opt/pita/foo is run.
> 
> Once the script finishes running (something that will typically take between
> a minute and an hour) the system should immediately do a full "power off"
> shut down.
> 
> Typically during testing runs the system will be run in snapshot mode, and
> will lose all changes at shut down time.
> 
> To complicate things just a little, I also need to be able to boot the
> machine normally for modifications and human interaction, so if the testing
> payload is not present (the payload device does not exist) I do NOT want the
> /opt/pita/foo script to be run, and the machine to boot to a normal console
> login.
> 
> All the code for the surrounding system that compiles the payload to a disk
> image and launches/manages the qemu image has been written and tested
> already, so this is the last step left before I can start running live tests
> in the system.
> 
> As a bonus, if anyone could actually BUILD me an image that does the above
> behavior, I'd be happy to throw in a slab or beer or something as a
> bounty/reward.
> 
> Thanks in advance for your assistance
I will have a quick stab, why not create a init script level 99 .... say 
/etc/rc2.d/S99zzzzTester


do a test to mount the test partition by name if it fails do nothing, if it 
mounts then cat a script on that partition called test.sh ?


the last step for test.sh could be poweroff ; exit


Alex

> 
> Adam K
> -- 
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
> 

-- 
I *know* it's weird, but strict vars already comes very, very close to
partitioning the crowd into those who can deal with local lexicals and
those who can't.
                -- Larry Wall in <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to