Code

Changed print_revision output order in utils.pm
[nagiosplug.git] / plugins-scripts / utils.pm.in
index 8449b544468403bc8191a85df701a5eed61a8e57..08776f181ea33108a39076f7a117d1534651b7aa 100644 (file)
@@ -34,7 +34,7 @@ sub print_revision ($$) {
        my $pluginRevision = shift;
        $pluginRevision =~ s/^\$Revision: //;
        $pluginRevision =~ s/ \$\s*$//;
-       print "$commandName (@PACKAGE@ @VERSION@) $pluginRevision\n";
+       print "$commandName v$pluginRevision (@PACKAGE@ @VERSION@)\n";
        print "@WARRANTY@";
 }
 
@@ -60,7 +60,7 @@ sub is_hostname {
                } 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;