Subject: Re: [vserver] Conditional start
From: "Edward Capriolo" <edlinuxguru@gmail.com>
Date: Sat, 16 Aug 2008 22:23:09 -0400

Though this may not be what you need, you can create a wrapper script
and put it first in your search path. Call the wrapper script, check
for conditions and pass the result along to the real vserver.

On Sat, Aug 16, 2008 at 1:05 PM, Oliver Welter <mail@oliwel.de> wrote:
> Hi Gilles,
>> How can make it so that "vserver <vsname> start" checks that some condition
>> is fulfilled before actually starting the vserver?
>>
>> [I'm considering the following: a program inside the vserver needs to access
>> data located on an external disk that might not be plugged in, so there
>> should be a test that checks for the existence of the device and, if not
>> present, reports it somehow, and does not start the vserver.]
>>
> vserver can execute scripts in different phases of the start. You will
> find infos in the documentation on this. I dont exactly know if you can
> interrupt the start by passing a special exit code, but at least it
> should be possible to do the mount.
>
> Oliver
>
>
>