Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / tests / boslisthosts.pl
1 #!/usr/bin/env perl
2 use OpenAFS::CMU_copyright;
3 use OpenAFS::util qw(:DEFAULT %AFS_Help);
4 use OpenAFS::afsconf;
5 use OpenAFS::fs;
6 use OpenAFS::pts;
7 use OpenAFS::vos;
8 use OpenAFS::bos;
9
10 my ($host, @hosts, $this, $cell, $cnt);
11 $host = `hostname`;
12 chomp $host;
13 &AFS_Init();
14 $cell = &AFS_fs_wscell();
15
16 @hosts = &AFS_bos_listhosts(localhost,);
17 $this = shift(@hosts);
18 if ($this ne $cell) {
19 exit (1);
20 }
21 while ($this = shift(@hosts)) {
22 if ($this ne $host) {
23 if (($this ne "128.2.1.2")) {
24 exit (1);
25 }
26 }
27 }
28 exit(0);
29
30
31