From d15721d2f8a26cd01259931cca5b3c00a6f77b6c Mon Sep 17 00:00:00 2001
From: Ton Voon <tonvoon@users.sourceforge.net>
Date: Thu, 19 Oct 2006 18:44:53 +0000
Subject: 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

diff --git a/THANKS.in b/THANKS.in
index 5bc5208..8bf6507 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -192,3 +192,4 @@ Nathan Vonnahme
 Mike Emigh
 Christian Mies
 Andreas Behal
+O'Shaughnessy Evans
diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in
index 028241d..d4dddae 100644
--- a/plugins-scripts/utils.pm.in
+++ b/plugins-scripts/utils.pm.in
@@ -2,6 +2,9 @@
 # $Id$
 #
 # $Log$
+# Revision 1.9  2006/10/19 18:44:53  tonvoon
+# Allow hostnames beginning with digits (O'Shaughnessy Evans - 1567390)
+#
 # Revision 1.8  2006/06/07 14:23:12  seanius
 # removed stale references to PATH_TO_NTPFOO, as it's no longer used.
 #
@@ -73,7 +76,7 @@ sub usage {
 
 sub is_hostname {
 	my $host1 = shift;
-	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]+)*)$/) {
+	if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)$/) {
 		return 1;
 	}else{
 		return 0;
-- 
cgit v0.10-9-g596f

