Changeset 1985 in genesis
- Timestamp:
- Apr 11, 2004, 5:55:16 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/inc2minimal.pl
r1978 r1985 7 7 my %ips = (); 8 8 9 foreach my $node ( keys %$VAR1) {9 foreach my $node (sort keys %$VAR1) { 10 10 foreach my $iface (keys %{ $VAR1->{$node}->{ifaces} }) { 11 11 my $v = $VAR1->{$node}->{ifaces}->{$iface}; … … 31 31 } 32 32 33 while (my ($node,$vals) = each %$VAR1) { 33 foreach my $node (sort keys %$VAR1) { 34 my $vals = $VAR1->{$node}; 34 35 print qq|<node id="$node" ip="$vals->{master_ip}> 35 36 <location>$vals->{location}</location> … … 37 38 foreach my $iface (sort keys(%{$vals->{ifaces}})) { 38 39 my $v = $vals->{ifaces}->{$iface}; 39 print qq| <iface id="$iface"|;40 print qq| <iface\tid="$iface"\n|; 40 41 41 42 if ($v->{TYPE} =~ m/wireless/i) { 42 43 my $ssid = "ERROR!"; 43 44 if ($v->{MODE} =~ m/master/i) { 44 print qq| channel="$v->{CHANNEL}"|;45 print qq|\t\tchannel="$v->{CHANNEL}"\n|; 45 46 $ssid = $v->{ESSID}; 46 print " master";47 print "\t\tmaster\n"; 47 48 } else { 48 49 # Channel vollows; ESSID is … … 55 56 } 56 57 }; 57 print qq| ssid="$ssid"|;58 print qq|\t\tssid="$ssid"\n|; 58 59 } 59 60 if ($v->{DHCP} =~ m/(\d+)\-(\d+)/) { 60 61 my $x = $2 - $1; 61 print qq| dhcp="$x"|;62 print qq|\t\tdhcp="$x"\n|; 62 63 }; 63 print " >\n";64 print "\t\t>\n"; 64 65 print qq| </iface>\n|; 65 66 }
Note:
See TracChangeset
for help on using the changeset viewer.