diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /bin/generate-raddb | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'bin/generate-raddb')
-rwxr-xr-x | bin/generate-raddb | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/bin/generate-raddb b/bin/generate-raddb deleted file mode 100755 index af21c05a8..000000000 --- a/bin/generate-raddb +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl - -# usage: generate-raddb radius-server/raddb/dictionary* >raddb.pm -# i.e.: generate-raddb ~/freeradius/freeradius-1.0.5/share/dictionary* ~/wirelessoceans/dictionary.ip3networks ~/wtxs/dictionary.mot.canopy >raddb.pm.new -print <<END; -package FS::raddb; -use vars qw(%attrib); - -%attrib = ( -END - -while (<>) { - next if /^(#|\s*$|\$INCLUDE\s+)/; - next if /^(VALUE|VENDOR|BEGIN\-VENDOR|END\-VENDOR)\s+/; - /^(ATTRIBUTE|ATTRIB_NMC)\s+([\w\-\/]+)\s+/ or die $_; - $attrib = $2; - $dbname = lc($2); - $dbname =~ s/[\-\/]/_/g; - $dbname = substr($dbname,0,24); - while ( exists $hash{$dbname} ) { - #warn $dbname; - $dbname =~ s/(.)$//; - my $w = $1; - $w =~ tr/_a-z0-9/a-z0-9_/; - $dbname = "$dbname$w"; - } - $hash{$dbname} = $attrib; - #print "$2\n"; -} - -foreach ( sort keys %hash ) { -# print "$_\n" if length($_)>24; -# print substr($_,0,24),"\n" if length($_)>24; -# $max = length($_) if length($_)>$max; -# have to fudge things since everything >24 is *not* unique - - #print " '". substr($_,0,24). "' => '$hash{$_}',\n"; - print " '$_' ". ( " " x (24-length($_) ) ). "=> '$hash{$_}',\n"; -} - -print <<END; - - #NETC.NET.AU (RADIATOR?) - 'authentication_type' => 'Authentication-Type', - - #wtxs (dunno) - #'radius_operator' => 'Radius-Operator', - -); - -1; -END - |