/[pxelator]/lib/PXElator/network.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/PXElator/network.pm

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

revision 197 by dpavlin, Tue Aug 11 12:38:23 2009 UTC revision 229 by dpavlin, Sun Aug 16 21:35:23 2009 UTC
# Line 12  sub ifconfig { Line 12  sub ifconfig {
12          `/sbin/ifconfig $dev`          `/sbin/ifconfig $dev`
13  }  }
14    
15    sub setup {
16    
17            if ( my $dev = $ENV{DEV} ) {
18                    warn "W: running under device $dev, not configuring network\n";
19                    return;
20            }
21    
22            my $ifconfig = ifconfig('virtual');
23            if ( $ifconfig !~ m{UP} ) {
24                    system "brctl addbr virtual";
25                    system "brctl setfd virtual 0";
26                    system("/sbin/ifconfig virtual $server::ip netmask $server::netmask") == 0 || warn "W: $!";
27            } else {
28                    warn "OK $ifconfig\n";
29            }
30    }
31    
32  sub tap {  sub tap {
33    
34          if ( my $dev = $ENV{DEV} ) {          if ( my $dev = $ENV{DEV} ) {

Legend:
Removed from v.197  
changed lines
  Added in v.229

  ViewVC Help
Powered by ViewVC 1.1.26