1 # Batch EXecutor 2.0 -- Configuration
2 # (c) 2011 Martin Mares <mj@ucw.cz>
9 # This file specifies default values, which can be overridden in BEX.cf
11 # A hash of all known machines and groups
12 # 'name' => { } for a machine
13 # 'name' => ['a','b','c'] for a group containing specified machines/subgroups
17 # A file whose contents should be prepended before the job. Should start with the "#!" line.
18 our $job_prolog = 'prolog';
20 # A file whose contents should be appended to the job
21 our $job_epilog = 'epilog';
23 # Various utility functions
25 sub parse_machine_list(@);
27 sub parse_machine_list(@) {
31 for my $mm (keys %machines) {
32 if (ref($machines{$mm}) eq 'HASH') {
39 if ($m =~ s{^!}{}) { $op = 0; }
40 my $v = $machines{$m};
42 die "Unknown machine or class: $m\n";
43 } elsif (ref($v) eq 'HASH') {
45 } elsif (ref($v) eq 'ARRAY') {
46 for my $mm (parse_machine_list(@$v)) {
51 return sort grep { $set{$_} } keys %set;