Changeset 8182 in genesis


Ignore:
Timestamp:
Jul 20, 2010, 6:45:04 PM (14 years ago)
Author:
richardvm
Message:

Added a filter to filter on netmask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/get-a-ils.pl

    r8161 r8182  
    11#!/usr/bin/env perl
     2
     3# Set some vars
     4
     5# Filter on netmask
     6$MASK = $ARGV[0];
     7# Otherwise return all.
     8if ( ! $MASK ) {
     9  $MASK = ".*";
     10}
    211
    312# Print the header
     
    8695
    8796        # Match the current ip of node/if with the ip specified in the search
    88         if ($il_ip eq $search) {
     97        # Match the netmask specified
     98        if (($il_ip eq $search) && ($il_mask =~ /$MASK/)) {
    8999          return $il_node;
    90100        }
Note: See TracChangeset for help on using the changeset viewer.