/[mdap]/lib/MDAP/ChangeIP.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

Diff of /lib/MDAP/ChangeIP.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by dpavlin, Sun Nov 18 00:55:43 2007 UTC revision 79 by dpavlin, Sun Nov 18 16:25:26 2007 UTC
# Line 38  sub check { Line 38  sub check {
38                                  warn "-- remove IP $current_ip\n" if $debug;                                  warn "-- remove IP $current_ip\n" if $debug;
39                                  return "ip ipdelete addr=$current_ip";                                  return "ip ipdelete addr=$current_ip";
40                          } elsif ( $ip_status->{$current_ip} > 0 ) {                          } elsif ( $ip_status->{$current_ip} > 0 ) {
41                                  warn "++ add IP $current_ip\n" if $debug;                                  my $mask = '';
42                                  return "ip ipadd intf=LocalNetwork addr=$current_ip";                                  $mask = '/8'  if $current_ip =~ m/^10\./;
43                                    $mask = '/24' if $current_ip =~ m/^192\.168\./;
44                                    warn "++ add IP $current_ip$mask\n" if $debug;
45                                    return "ip ipadd intf=LocalNetwork addr=$current_ip$mask";
46                          }                          }
47                  }                  }
48                  return;                  return;

Legend:
Removed from v.64  
changed lines
  Added in v.79

  ViewVC Help
Powered by ViewVC 1.1.26