Subject: Re: [vserver] start-vservers patch
From: "Daniel Hokka Zakrisson" <daniel@hozac.com>
Date: Tue, 1 Feb 2011 07:03:52 +0100 (CET)

Jeff Jansen wrote:
> Here's patch for the "start-vservers" script to implement the ability to
> specify the order in which vservers are started and stopped.  (Since I
> asked about it some time ago I thought I should post my solution.) :-)

Why aren't you just using the depends file to specify dependencies?

> http://www.kkoncepts.net/sites/default/files/start-vservers.patch
>
> (I'm not sure if you can attach files to this mailing list, so I'm just
> posting a link.  The patch is against "util-vserver-0.30.216-pre2926"
> but it also applies cleanly against "util-vserver-0.30.215".)
>
> This allows you to create a new file called "startorder" in a vserver's
> "apps/init" directory in which you can specify what order that vserver
> should be started relative to the others - 1, 2, 3, ...
>
> Vservers are started in the (numerical) order you specify and stopped in
> reverse order.  Vservers with the 'mark' file set but without the
> 'startorder' file are started after all vservers which do have the
> 'startorder' file.  If you have specified a 'depends' file, that is
> still honored.
>
> I'd be glad if this got included in the next util-vserver package so I
> don't have to patch it myself anymore, but, of course, patching isn't
> hard, so feel free to ignore this completely. ;-)
>
> And if anyone sees any bugs, improvements, etc., please do let me know.
>
> TIA
>
> Jeff Jansen

-- 
Daniel Hokka Zakrisson