Sorry - sent to Herbert directly the first time instead of to the list. On Wednesday 02,February,2011 01:21 PM, Herbert Poetzl wrote: > I think Daniel might be more inclined to add such a feature > if it would handle the strict order you want to introduce > as a priority instead ... > > i.e. let's assume each guest has a 'priority' entry, which > classifies the guest within an arbitrarily high numeric > range (like 0 - MAX_INT), and which is consulted when the > dependancies and the parallel startup have a bunch of other- > wise equal guests to select from > > putting numbers like 100, 200, 300, ... in that priority > entry would then be able to prefer one guest over the other > despite the fact that 10 guests are always started at once > or none of them have any dependancy ... OK, I can change the name of the file to "priority" (in place of "startorder") and remove the check for duplicate entries so you can put multiple machines at the same "priority". But it seems to me that what you describe is what this patch does; it just sorts the order of the vservers in one shot BEFORE it looks at dependencies, etc., rather than checking repeatedly afterwards. Right now the start-vservers script gets a list of vservers that should be automatically started or stopped by using a 'for' loop and a glob for _ga_i in $__CONFDIR/*; do ... and checking for the 'mark' file in each of these directory trees. So it returns an array of vservers in whatever order your OS sorts filenames. My patch simply allows you to override that order if you like. If you do, then the array is pre-sorted into the order you specify. Otherwise the default order remains. THEN the array is passed on for processing - so all the other mechanisms like 'depends' files still work. If you specify a priority and a depends file, the depends file always wins because it happens later in the process. It seems to me that this is a much simpler solution than having the script check for a priority every time it has a bunch of "equally ranked" vservers to start. But I'll freely admit that you and Daniel have probably forgotten more about vservers than I ever know, so if you don't think it's necessary/a good idea, that's fine by me. :-) Jeff Jansen