FreeBSD Bugzilla – Attachment 151378 Details for
Bug 196528
[MAINTAINER] [PATCH] net-mgmt/nagios-check_dhcp.pl: patch to make it work with net/p5-IO-Interface 1.09
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch file
patch (text/plain), 1.24 KB, created by
Lawrence Chen
on 2015-01-06 03:03:00 UTC
(
hide
)
Description:
patch file
Filename:
MIME Type:
Creator:
Lawrence Chen
Created:
2015-01-06 03:03:00 UTC
Size:
1.24 KB
patch
obsolete
>--- Makefile.orig 2014-10-05 16:40:29.000000000 -0500 >+++ Makefile 2015-01-05 20:25:24.445728883 -0600 >@@ -3,6 +3,7 @@ > > PORTNAME= check_dhcp.pl > PORTVERSION= 0.1 >+PORTREVISION= 1 > CATEGORIES= net-mgmt > MASTER_SITES= http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1526&cf_id=24&dummy=/ > PKGNAMEPREFIX= nagios- >--- files/patch-check_dhcp.pl.orig 1969-12-31 18:00:00.000000000 -0600 >+++ files/patch-check_dhcp.pl 2015-01-05 20:23:14.615726336 -0600 >@@ -0,0 +1,29 @@ >+--- check_dhcp.pl.orig 2015-01-05 20:13:21.750727469 -0600 >++++ check_dhcp.pl 2015-01-05 20:21:16.975726358 -0600 >+@@ -25,8 +25,7 @@ >+ # >+ # >+ use strict; >+-use IO::Socket; >+-use IO::Interface; >++use IO::Interface::Simple; >+ use Net::DHCP::Watch; >+ use Getopt::Long qw(:config no_ignore_case); >+ >+@@ -101,12 +100,12 @@ >+ } >+ >+ # Get the mac and IP address for the given interface >+-my $s = IO::Socket::INET->new(Proto => 'udp'); >+-if ( !($ip = $s->if_addr($interface)) ){ >++my $if = IO::Interface::Simple->new($interface); >++if ( !($ip = $if->address) ){ >+ print "Error: $!\n"; >+ exit($STATUSCODE{'CRITICAL'}); >+ } >+-if ( !($mac = $s->if_hwaddr($interface)) ){ >++if ( !($mac = $if->hwaddr) ){ >+ print "Error: $!\n"; >+ exit($STATUSCODE{'CRITICAL'}); >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196528
: 151378 |
151379