index 8449b544468403bc8191a85df701a5eed61a8e57..37cd62c3b8210f3476f0f3964491eb3a35e3caf3 100644 (file)
# Utility drawer for Nagios plugins.
-# $Id$
#
# This will be deprecated soon. Please use Nagios::Plugin from CPAN
# for new plugins
sub print_revision ($$) {
my $commandName = shift;
my $pluginRevision = shift;
- $pluginRevision =~ s/^\$Revision: //;
- $pluginRevision =~ s/ \$\s*$//;
- print "$commandName (@PACKAGE@ @VERSION@) $pluginRevision\n";
+ print "$commandName v$pluginRevision (@PACKAGE@ @VERSION@)\n";
print "@WARRANTY@";
}
} else {
return 0;
}
- } elsif ($host1 =~ m/^[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*\.?$/) {
+ } elsif ($host1 =~ m/^[a-zA-Z0-9][-a-zA-Z0-9]*(\.[a-zA-Z0-9][-a-zA-Z0-9]*)*\.?$/) {
return 1;
} else {
return 0;