2 #################################################################################
5 # Description: Verify that Rational Clearcase was installed correctly
6 # Author: Andrew@DeFaria.com
7 # Created: Mon Mar 15 08:48:24 PST 2004
10 # (c) Copyright 2004, Andrew@DeFaria.com, all rights reserved.
12 ################################################################################
16 my $logpath = "\\\\rtnlprod02\\viewstore\\PMO\\CM_TOOLS\\log";
17 my $hostname = `hostname`; chomp $hostname;
18 my $logfile = "$logpath\\$hostname.log";
22 open LOGFILE, ">>$logfile"
23 or die "Unable to open logfile: $logfile - $!\n";
29 print LOGFILE "$message\n";
35 my $status = system "cleartool lsvob \\$tag > NUL 2>&1";
38 return system "cleartool mktag -vob -tag \\$tag \\\\rtnlprod01\\vobstore\\$tag.vbs > NUL 2>&1";
45 return system "cleartool rmtag -vob \\$tag > NUL 2>&1";
51 return system "cleartool rmview -force -tag $tag > NUL 2>&1";
57 my $status = system "cleartool lsview -short $tag > NUL 2>&1";
60 return system "cleartool mkview -tag $tag -stgloc -auto > NUL 2>&1";
63 return system "cleartool mkview -tag $tag -stgloc -auto > NUL 2>&1";
72 return system "cleartool mount \\$tag > NUL 2>&1";
78 my $status = system "cleartool umount \\$tag > NUL 2>&1";
85 my $version = `cleartool -ver`;
86 my $primary_group = $ENV {CLEARCASE_PRIMARY_GROUP};
88 my @hostinfo = `cleartool hostinfo -long`;
89 my $region = "Not Set";
93 if (/\s*Registry region:\s*(\S*)/) {
99 logmsg "CCVerify Version $ccverify";
100 logmsg "Verifying Clearcase installation on $hostname (" . scalar (localtime) . ")\n";
101 logmsg "Clearcase Version Information\n";
104 if (!defined $primary_group) {
105 $primary_group = "<not set>";
109 logmsg "Clearcase Primary Group:\t$primary_group";
110 logmsg "Clearcase Region:\t\t$region\n";
112 if (mkview ($tag) eq 0) {
113 logmsg "Created a dynamic view named $tag";
116 logmsg "Unable to create the $tag dynamic view!";
119 if (mount_vob ($tag) eq 0) {
120 logmsg "Mounted the vob \\$tag";
123 logmsg "Unable to mount the vob \\$tag";
126 if (umount_vob ($tag) eq 0) {
127 logmsg "Unmounted the vob \\$tag";
130 logmsg "Unable to unmount vob \\$tag";
133 if (rmview ($tag) eq 0) {
134 logmsg "Removed view $tag";
137 logmsg "Unable to remove view $tag";
142 "\n--------------------------------------------
143 Clearcase installed and functioning properly
144 --------------------------------------------\n";
147 "\n------------------------------------------------
148 Clearcase NOT installed and functioning properly
149 ------------------------------------------------\n";