Initial version of test script to ensure /etc/clusters is accessible

This commit is contained in:
duncan_ferguson 2004-04-15 10:08:26 +00:00
parent b9901dfe77
commit 60d80f7c36

71
clusterssh/chk_cluster Executable file
View file

@ -0,0 +1,71 @@
#!/usr/local/bin/perl -w
# $Id$
#
# Script:
# $RCSfile$
#
# Usage:
# <Normal usage of this script - how/when is it run>
#
# Options:
# <Standard options which this script accepts>
# -v (O) Verbose mode - prints out informational data
#
# -? (O) Usage and help for this script
#
# Parameters:
# <Specific parameters for the script>
# -p (O) process name (if not provided, use configuration file)
#
# Purpose:
# <Brief description of the scripts purpose>
#
# Processing:
# Detailed description of the process flow - virtually the pseudo code>
#
# Dependencies:
# <list of any know dependancies which this script requires>
#
# Limitations:
# <Any known or perceived limitations with the script - be honest now !!>
#
# Enhancements:
# <Any future enhancements which would either make this script
# more useful or fix any know limitations>
#
############################################################################
# Change log located at file end
############################################################################
my $VERSION='$Revision$ ($Date$)';
# Now tidy it up, but in such as way cvs doesn't kill the tidy up stuff
$VERSION=~s/\$Revision: //;
$VERSION=~s/\$Date: //;
$VERSION=~s/ \$//g;
use warnings;
use strict;
my %clusters;
open(CLUSTERS,"<", "/etc/clusters") or die("Failed: $!");
while(<CLUSTERS>)
{
next if(/^#/);
next if(/^\s*$/);
chomp;
s/^([\w-]+)\s*//;
print "Found $1 for servers $_\n";
}
close(CLUSTERS);
############################################################################
# $Log$
# Revision 1.1 2004/04/15 10:08:26 duncan_ferguson
# Initial version of test script to ensure /etc/clusters is accessible
#
############################################################################