Changeset 6508 in genesis


Ignore:
Timestamp:
Dec 29, 2008, 11:14:20 PM (16 years ago)
Author:
rick
Message:
  • Enhanced usage line to only include 'usefull' nodes
  • Extracted and pre-parsed compass-direction for the use at DIRECTION_CHOICES in exodus
File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/genesis-to-py.pl

    r6474 r6508  
    99# Which gonna be used for more logic stuff ;-)
    1010
    11 #
    12 # Usage: for file in */wleiden.conf; do ./genesis-to-py.pl $file; done > py.conf
     11# Avoid junk node imports, use following line to import valid nodes
     12# Usage: for file in CNode*/wleiden.conf proxy*/wleiden.conf; do ./genesis-to-py.pl $file; done > py.conf
    1313do($ARGV[0]) || die;
    1414
     
    4848        'configtype' => 'interface',
    4949        'dhcp' => 'no',
     50        'compass-direction' => '',
    5051        );
    5152    foreach $line  (split('\n',$config{$if})) {
     
    7475            } elsif ($key =~ /^essid$/i) {
    7576                $key = 'ssid';
     77
     78                # Dirty hack to fetch compass direction of essid
     79                $value =~ /[a-z]+-([a-z]+)\..*/;
     80                $direction = $1;
     81                # Translate into English
     82                if ($direction ne "omni") {
     83                    $direction =~ tr/oz/es/;
     84                }
     85                $tmp{'compass-direction'} = $direction;
    7686            } elsif ($key =~ /^gain$/i) {
    7787                $value =~ s/dbi//;
Note: See TracChangeset for help on using the changeset viewer.