diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:00 +0000 |
commit | af754e596a8dbb05ed8580c342e7fe02e08b28e0 (patch) | |
tree | b2f334c2b55ede42081aa6710a72da784547d8ea /share/dct2fr | |
parent | Initial commit. (diff) | |
download | freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.tar.xz freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.zip |
Adding upstream version 3.2.3+dfsg.upstream/3.2.3+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/dct2fr')
-rwxr-xr-x | share/dct2fr | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/share/dct2fr b/share/dct2fr new file mode 100755 index 0000000..e61fb83 --- /dev/null +++ b/share/dct2fr @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# +# Horrible hack to convert Funk dictionaries to FreeRADIUS ones. +# +# It won't convert everything, and the files still need to be +# edited afterwards, but it's a start. +# +# ./dct2fr foo.dct > dictionary.foo +# vi dictionary.foo +# replace 'foo' with the real vendor name +# ./format.pl dictionary.foo +# + +while (<>) { + if (/^MACRO\s+([^ \t\(]+)\(t,s\)\s+26\s+\[vid=(\d+)\s+type1=\%t\%\s+len1=\+2\s+data=\%s\%/) { + $name = $1; + $vendor = $2; + + print "VENDOR foo $2\n"; + print "BEGIN-VENDOR foo\n"; + } + +# if (/^ATTRIBUTE\s+([^ \t]+)\s+$name\s*\((\d+),s+(\w+)\)/i) { + + if (/^ATTRIBUTE\s+([^ \t]+)\s+$name\s*\((\d+)\s*,\s*(\w+)/i) { + print "ATTRIBUTE $1 $2 $3\n"; + } +} + +print "END-VENDOR foo\n"; |