Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / tests / bosremovehost.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 &AFS_bos_removehost(localhost,"128.2.1.2",);
17 @hosts = &AFS_bos_listhosts(localhost,);
18 $this = shift(@hosts);
19 if ($this ne $cell) {
20 exit (1);
21 }
22 while ($this = shift(@hosts)) {
23 if ($this ne $host) {
24 exit (1);
25 }
26 }
27 exit(0);
28
29
30