[Nagiosplug-checkins] nagiosplug/plugins-scripts utils.pm.in, 1.8, 1.9

Ton Voon tonvoon at users.sourceforge.net
Thu Oct 19 20:44:55 CEST 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18038/plugins-scripts

Modified Files:
	utils.pm.in 
Log Message:
Allow hostnames beginning with digits (O'Shaughnessy Evans - 1567390)


Index: utils.pm.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/utils.pm.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- utils.pm.in	7 Jun 2006 14:23:12 -0000	1.8
+++ utils.pm.in	19 Oct 2006 18:44:53 -0000	1.9
@@ -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 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;





More information about the Commits mailing list