diff -ruN nagiosplug-save/contrib/check_vcs.pl nagiosplug/contrib/check_vcs.pl
--- nagiosplug-save/contrib/check_vcs.pl	2002-05-23 17:39:59.000000000 +0100
+++ nagiosplug/contrib/check_vcs.pl	2004-03-27 23:16:51.000000000 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -wT
 #
 # Veritas Cluster System monitor for Nagios.
 # Written by Aaron Bostick (abostick@mydoconline.com)
@@ -43,123 +43,105 @@
 #   check_vcs -r oraip -s dbserver2 -n
 #
 
-
-BEGIN {
-    if ($0 =~ s/^(.*?)[\/\\]([^\/\\]+)$//) {
-        $prog_dir = $1;
-        $prog_name = $2;
-    }
-}
-
 require 5.004;
-
-use lib $main::prog_dir;
-use utils qw($TIMEOUT %ERRORS &print_revision &support);
-use Getopt::Long;
-
-sub print_usage ();
-sub print_version ();
-sub print_help ();
-
-    # Initialize strings
-    $vcs_bin = '/opt/VRTSvcs/bin';
-    $vcs_command = '';
-    $vcs_arg = '';
-    $vcs_group = '';
-    $vcs_resource = '';
-    $vcs_system = '';
-    $vcs_negate = '';
-    $vcs_result = '';
-    $vcs_expected_result = 'ONLINE';
-    $plugin_revision = '$Revision: 1.1 $ ';
-
-    # Grab options from command line
-    GetOptions
-    ("g|group:s"        => \$vcs_group,
-     "r|resouce:s"      => \$vcs_resource,
-     "s|system=s"       => \$vcs_system,
-     "n|negate"         => \$vcs_negate,
-     "v|version"        => \$version,
-     "h|help"           => \$help);
- 
-    (!$version) || print_version ();
-    (!$help) || print_help ();
-    (!$vcs_negate) || ($vcs_expected_result = 'OFFLINE');
-
-    # Make sure group and resource is not specified
-    !($vcs_group && $vcs_resource) || usage("Please specify either a group or a resource, but not both.\n");
-    # Make sure group or resource is specified
-    ($vcs_group || $vcs_resource) || usage("HA group or resource not specified.\n");
-    # Make sure system is specified
-    ($vcs_system) || usage("HA system not specified.\n");
-
-    # Specify proper command
-    if ($vcs_group) {
-        $vcs_command = 'hagrp';
-        $vcs_arg = $vcs_group;
-    } else {
-        $vcs_command = 'hares';
-        $vcs_arg = $vcs_resource;
-    }
-
-    # Run command and save output
-    $vcs_result = `$vcs_bin/$vcs_command -state $vcs_arg -sys $vcs_system`;
-    chomp ($vcs_result);
-
-    # If empty result, return UNKNOWN
-    if (!$vcs_result) {
-        print "UNKNOWN: Problem running $vcs_command...\n";
-        exit $ERRORS{'UNKNOWN'};
-    }
-        
-    # If result is expected, return OK
-    # If result is not expected, return CRITICAL
-    if ($vcs_result eq $vcs_expected_result) {
-        print "OK: $vcs_command $vcs_arg is $vcs_result\n";
-        exit $ERRORS{'OK'};
-    } else {
-        print "CRITICAL: $vcs_command $vcs_arg is $vcs_result\n";
-        exit $ERRORS{'CRITICAL'};
-    }
-        
-
-#
-# Subroutines
-#
-
-sub usage () {
-    print @_;
-    print_usage();
-    exit $ERRORS{'OK'};
+use strict;
+use lib utils.pm ;
+use Plugin;
+use Plugin::Parameter qw(:DEFAULT);
+
+use vars qw($PROGNAME $vcs_group $vcs_resource $vcs_system $vcs_negate);
+
+use utils qw(%ERRORS);
+
+my $g_opt = new Plugin::Parameter(-name => "group", -flags => [ 'g', 'group' ],
+				  -optional => "yes", -valueoptional => "no", -type => "VCSGROUP",
+				  -binding => \$vcs_group,
+				  -checker => sub { my ($opt, $parameter, $plugin) = @_;
+						    if (defined $$opt) {
+						      $$opt =~ m/^(.*)$/;
+						      $$opt = $1;
+						    }
+						  },
+				  -description => "The HA group to be validated");
+my $r_opt = new Plugin::Parameter(-name => "resource", -flags => [ 'r', 'resource' ],
+				  -optional => "yes", -valueoptional => "no", -type => "VCSRESOURCE",
+				  -binding => \$vcs_resource,
+				  -checker => sub { my ($opt, $parameter, $plugin) = @_;
+						    if (defined $$opt) {
+						      $$opt =~ m/^(.*)$/;
+						      $$opt = $1;
+						    }
+						  },
+				  -description => "The HA resource to be validated");
+my $s_opt = new Plugin::Parameter(-name => "system", -flags => [ 's', 'system' ],
+				  -optional => "no", -valueoptional => "no", -type => "VCSSYSTEM",
+				  -binding => \$vcs_system,
+				  -checker => sub { my ($opt, $parameter, $plugin) = @_;
+						    if (defined $$opt) {
+						      $$opt =~ m/^(.*)$/;
+						      $$opt = $1;
+						    }
+						  },
+				  -description => "The HA system where the group/resource lives");
+my $n_opt = new Plugin::Parameter(-name => "negate", -flags => [ 'n', 'negate' ],
+				  -optional => "yes", -valueoptional => "yes", -type => "NONE",
+				  -binding => \$vcs_negate,
+				  -description => "Set the expected result to OFFLINE instead of ONLINE");
+my $plugin = new Plugin(-revision => '$Revision: 1.1 $',
+			-copyright => "2002 Aaron Bostick <abostick\@mydoconline.com>, 2004 Howard Wilkinson <howard\@cohtech.com>",
+			-shortcomment => "Validate output from hagrp/hares command.",
+			-checker => sub { my ($plugin) = @_;
+					  if ($vcs_group && $vcs_resource) {
+					    $plugin->usage();
+					    utils::usage("$PROGNAME UNKNOWN: Please specify either a group of a resource, but not both\n");
+					  }
+					  if (!$vcs_group && !$vcs_resource) {
+					    $plugin->usage();
+					    utils::usage("$PROGNAME UNKNOWN: HA group or resource not specified\n");
+					  }
+					},
+			-parameterlists => [ [ $s_opt, $g_opt, $r_opt, $n_opt, $t_opt ], $h_opts, $V_opts ]);
+
+# Initialize strings
+my $vcs_bin = '/opt/VRTSvcs/bin';
+my $vcs_command = '';
+my $vcs_arg = '';
+
+my $vcs_result = '';
+my $vcs_expected_result = 'ONLINE';
+
+$plugin->init();
+
+(!$vcs_negate) || ($vcs_expected_result = 'OFFLINE');
+
+# Specify proper command
+if ($vcs_group) {
+  $vcs_command = 'hagrp';
+  $vcs_arg = $vcs_group;
+} else {
+  $vcs_command = 'hares';
+  $vcs_arg = $vcs_resource;
 }
 
-sub print_usage () {
-    print "\nUsage: $prog_name { -g <vcs_group> | -r <vcs_resource> } -s <vcs_system> [-n]\n";
-    print "Usage: $prog_name [ -v | --version ]\n";
-    print "Usage: $prog_name [ -h | --help ]\n";
+$ENV{PATH} = '';
+$ENV{BASH_ENV} = '';
+# Run command and save output
+$vcs_result = `$vcs_bin/$vcs_command -state $vcs_arg -sys $vcs_system`;
+chomp ($vcs_result);
+
+# If empty result, return UNKNOWN
+if (!$vcs_result) {
+  print "$PROGNAME UNKNOWN: Problem running $vcs_command...\n";
+  exit $ERRORS{'UNKNOWN'};
 }
-
-sub print_version () {
-    print_revision($prog_name, $plugin_revision);
-    exit $ERRORS{'OK'};
+# If result is expected, return OK
+# If result is not expected, return CRITICAL
+if ($vcs_result eq $vcs_expected_result) {
+  print "$PROGNAME OK: $vcs_command $vcs_arg is $vcs_result\n";
+  exit $ERRORS{'OK'};
+} else {
+  print "$PROGNAME CRITICAL: $vcs_command $vcs_arg is $vcs_result\n";
+  exit $ERRORS{'CRITICAL'};
 }
 
-sub print_help () {
-    print_revision($prog_name, $plugin_revision);
-    print "\n";
-    print "Validate output from hagrp/hares command.\n";
-    print "\n";
-    print_usage();
-    print "\n";
-    print "-g, --group=<vcs_group>\n";
-    print "    The HA group to be validated\n";
-    print "-r, --resource=<vcs_resource>\n";
-    print "    The HA resource to be validated\n";
-    print "-s, --system=<vcs_system>\n";
-    print "    The HA system where the group/resource lives\n";
-    print "-n, --negate=<negate>\n";
-    print "    Set expected result to OFFLINE instead of ONLINE\n";
-    print "\n";
-    support();
-    exit $ERRORS{'OK'};
-}
+# NOT REACHED.
