View | Details | Raw Unified | Return to bug 196528
Collapse All | Expand All

(-)Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	check_dhcp.pl
4
PORTNAME=	check_dhcp.pl
5
PORTVERSION=	0.1
5
PORTVERSION=	0.1
6
PORTREVISION=	1
6
CATEGORIES=	net-mgmt
7
CATEGORIES=	net-mgmt
7
MASTER_SITES=	http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1526&cf_id=24&dummy=/
8
MASTER_SITES=	http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1526&cf_id=24&dummy=/
8
PKGNAMEPREFIX=	nagios-
9
PKGNAMEPREFIX=	nagios-
(-)files/patch-check_dhcp.pl (+29 lines)
Line 0 Link Here
1
--- check_dhcp.pl.orig	2015-01-05 20:13:21.750727469 -0600
2
+++ check_dhcp.pl	2015-01-05 20:21:16.975726358 -0600
3
@@ -25,8 +25,7 @@
4
 # 
5
 #
6
 use strict;
7
-use IO::Socket;
8
-use IO::Interface;
9
+use IO::Interface::Simple;
10
 use Net::DHCP::Watch;
11
 use Getopt::Long qw(:config no_ignore_case);
12
 
13
@@ -101,12 +100,12 @@
14
 } 
15
 
16
 # Get the mac and IP address for the given interface
17
-my $s = IO::Socket::INET->new(Proto => 'udp');
18
-if ( !($ip  = $s->if_addr($interface)) ){
19
+my $if = IO::Interface::Simple->new($interface);
20
+if ( !($ip  = $if->address) ){
21
     print "Error: $!\n";
22
     exit($STATUSCODE{'CRITICAL'});
23
 }
24
-if ( !($mac  = $s->if_hwaddr($interface)) ){
25
+if ( !($mac  = $if->hwaddr) ){
26
     print "Error: $!\n";
27
     exit($STATUSCODE{'CRITICAL'});
28
 }
29

Return to bug 196528