3 # usage: generate-raddb radius-server/raddb/dictionary* >raddb.pm
4 # i.e.: generate-raddb ~/freeradius/freeradius-1.0.5/share/dictionary* ~/wirelessoceans/dictionary.ip3networks ~/wtxs/dictionary.mot.canopy >raddb.pm.new
13 next if /^(#|\s*$|\$INCLUDE\s+)/;
14 next if /^(VALUE|VENDOR|BEGIN\-VENDOR|END\-VENDOR)\s+/;
15 /^(ATTRIBUTE|ATTRIB_NMC)\s+([\w\-\/]+)\s+/ or die $_;
18 $dbname =~ s/[\-\/]/_/g;
19 $dbname = substr($dbname,0,24);
20 while ( exists $hash{$dbname} ) {
24 $w =~ tr/_a-z0-9/a-z0-9_/;
25 $dbname = "$dbname$w";
27 $hash{$dbname} = $attrib;
31 foreach ( sort keys %hash ) {
32 # print "$_\n" if length($_)>24;
33 # print substr($_,0,24),"\n" if length($_)>24;
34 # $max = length($_) if length($_)>$max;
35 # have to fudge things since everything >24 is *not* unique
37 #print " '". substr($_,0,24). "' => '$hash{$_}',\n";
38 print " '$_' ". ( " " x (24-length($_) ) ). "=> '$hash{$_}',\n";
43 #NETC.NET.AU (RADIATOR?)
44 'authentication_type' => 'Authentication-Type',
47 #'radius_operator' => 'Radius-Operator',