Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / libuafs / afsload / afsload_check.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 use AFS::Load::Config;
6
7 sub usage() {
8 print STDERR "Usage: $0 -p <NP> <testconfig.conf>";
9 exit(1);
10 }
11
12 if ($#ARGV < 2) {
13 usage();
14 }
15
16 my $flag = $ARGV[0];
17 my $np = $ARGV[1];
18 my $conf_file = $ARGV[2];
19
20 if ($flag ne "-p") {
21 usage();
22 }
23 if (!($np =~ m/^\d+$/)) {
24 usage();
25 }
26
27 print "# Checking if config $conf_file is valid for $np processes...\n";
28
29 AFS::Load::Config::check_conf($np, $conf_file);
30
31 print "# Config file $conf_file has no fatal errors\n";