summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/utils.pm.in
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/utils.pm.in')
-rw-r--r--plugins-scripts/utils.pm.in31
1 files changed, 4 insertions, 27 deletions
diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in
index d4dddae9..e2458359 100644
--- a/plugins-scripts/utils.pm.in
+++ b/plugins-scripts/utils.pm.in
@@ -1,32 +1,9 @@
1# Utility drawer for Nagios plugins. 1# Utility drawer for Nagios plugins.
2# $Id$ 2# $Id$
3# 3#
4# $Log$ 4# This will be deprecated soon. Please use Nagios::Plugin from CPAN
5# Revision 1.9 2006/10/19 18:44:53 tonvoon 5# for new plugins
6# Allow hostnames beginning with digits (O'Shaughnessy Evans - 1567390) 6
7#
8# Revision 1.8 2006/06/07 14:23:12 seanius
9# removed stale references to PATH_TO_NTPFOO, as it's no longer used.
10#
11# Revision 1.7 2003/04/13 04:25:36 sghosh
12# update for check_mailq - qmail support
13#
14# Revision 1.6 2003/02/03 20:29:55 sghosh
15# change ntpdc to ntpq (Jonathan Rozes,Thomas Schimpke, bug-656237 )
16#
17# Revision 1.5 2002/10/30 05:07:29 sghosh
18# monitor mailq
19#
20# Revision 1.4 2002/05/27 02:01:09 sghosh
21# new var - smbclient
22#
23# Revision 1.3 2002/05/10 03:49:22 sghosh
24# added programs to autoconf
25#
26# Revision 1.2 2002/05/08 05:10:35 sghosh
27# is_hostname added, update CODES to POSIX
28#
29#
30package utils; 7package utils;
31 8
32require Exporter; 9require Exporter;
@@ -76,7 +53,7 @@ sub usage {
76 53
77sub is_hostname { 54sub is_hostname {
78 my $host1 = shift; 55 my $host1 = shift;
79 if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)$/) { 56 if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*)$/) {
80 return 1; 57 return 1;
81 }else{ 58 }else{
82 return 0; 59 return 0;