summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-10-19 18:44:53 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2006-10-19 18:44:53 +0000
commitd15721d2f8a26cd01259931cca5b3c00a6f77b6c (patch)
tree557ebe7772a6cfbb6288cd75252ae3264215ba78
parent6ab0bfca5a908882b295586d8772dd0fbf7eb933 (diff)
downloadmonitoring-plugins-d15721d2f8a26cd01259931cca5b3c00a6f77b6c.tar.gz
Allow hostnames beginning with digits (O'Shaughnessy Evans - 1567390)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1501 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--THANKS.in1
-rw-r--r--plugins-scripts/utils.pm.in5
2 files changed, 5 insertions, 1 deletions
diff --git a/THANKS.in b/THANKS.in
index 5bc52088..8bf65079 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -192,3 +192,4 @@ Nathan Vonnahme
192Mike Emigh 192Mike Emigh
193Christian Mies 193Christian Mies
194Andreas Behal 194Andreas Behal
195O'Shaughnessy Evans
diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in
index 028241d4..d4dddae9 100644
--- a/plugins-scripts/utils.pm.in
+++ b/plugins-scripts/utils.pm.in
@@ -2,6 +2,9 @@
2# $Id$ 2# $Id$
3# 3#
4# $Log$ 4# $Log$
5# Revision 1.9 2006/10/19 18:44:53 tonvoon
6# Allow hostnames beginning with digits (O'Shaughnessy Evans - 1567390)
7#
5# Revision 1.8 2006/06/07 14:23:12 seanius 8# Revision 1.8 2006/06/07 14:23:12 seanius
6# removed stale references to PATH_TO_NTPFOO, as it's no longer used. 9# removed stale references to PATH_TO_NTPFOO, as it's no longer used.
7# 10#
@@ -73,7 +76,7 @@ sub usage {
73 76
74sub is_hostname { 77sub is_hostname {
75 my $host1 = shift; 78 my $host1 = shift;
76 if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]+(\.[a-zA-Z][-a-zA-Z0-9]+)*)$/) { 79 if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)$/) {
77 return 1; 80 return 1;
78 }else{ 81 }else{
79 return 0; 82 return 0;