/[mdap]/lib/MDAP/DHCP.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /lib/MDAP/DHCP.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 64 - (show annotations)
Sun Nov 18 00:55:43 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 449 byte(s)
 r89@brr:  root | 2007-11-18 01:51:20 +0100
 - move $debug into MDAP and export it
 - iterate plugins correctly

1 package MDAP::DHCP;
2
3 use strict;
4 use warnings;
5
6 use Module::Pluggable;
7 use MDAP;
8
9 sub check {
10 my ( $self, $h ) = @_;
11
12 my $serial = $h->{'_PROD_SERIAL_NBR'} || die "no serial?";
13 my $dhcp = $h->{'DHCP_CONFIG'} || die "no DHCP_CONFIG?";
14
15 if ( $dhcp =~ m/(\d+) server/ ) {
16 return if $1 == 0;
17 warn "## $serial $dhcp" if $debug;
18 return 'dhcp server config state disabled';
19 } else {
20 once "OK ",__PACKAGE__," $serial $dhcp";
21 return;
22 }
23 }
24
25 1;

  ViewVC Help
Powered by ViewVC 1.1.26