diff options
author | Gerald Carter <jerry@samba.org> | 2002-02-02 15:44:37 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-02-02 15:44:37 +0000 |
commit | c8bc0fa4a7be25cb926750a56085e1e98ed9046b (patch) | |
tree | ec7bb9c0ce893fda80a6eb1f264c4717b3f667ac /packaging/Debian/debian/wins2dns.awk | |
parent | 8cb4e23ffc77a9842e1304f3de20af5861982746 (diff) | |
download | samba-c8bc0fa4a7be25cb926750a56085e1e98ed9046b.tar.gz samba-c8bc0fa4a7be25cb926750a56085e1e98ed9046b.tar.bz2 samba-c8bc0fa4a7be25cb926750a56085e1e98ed9046b.zip |
merge from 2.2
(This used to be commit 473a89cde2e60c359cb435c714dc98974489a118)
Diffstat (limited to 'packaging/Debian/debian/wins2dns.awk')
-rw-r--r-- | packaging/Debian/debian/wins2dns.awk | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/packaging/Debian/debian/wins2dns.awk b/packaging/Debian/debian/wins2dns.awk new file mode 100644 index 0000000000..176868a115 --- /dev/null +++ b/packaging/Debian/debian/wins2dns.awk @@ -0,0 +1,38 @@ +#!/usr/bin/awk -f +# +# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) +# From: Jason Gunthorpe <jgg@deltatee.com> +# To: samba@packages.debian.org +# Subject: Nifty samba script +# +# Here is a really nifty script I just wrote for samba, it takes the wins +# database in /var/samba/wins and writes out two dns files for it. In this +# way network wide wins clients can get into the dns for use by unix +# machines. +# +# Perhaps this could be included in /usr/doc/examples or somesuch. +# + +BEGIN { + FS="#|\""; +FORWARD="/tmp/wins.hosts" +REVERSE="/tmp/wins.rev" +DOMAIN="ven.ra.rockwell.com" +} +$3 == "00" { + split($4,a," " ); + split(a[2],b,"."); + while (sub(" ","-",$2)); + $2=tolower($2); + if (b[1] == "255") + next; + if (length($2) >= 8) + print $2"\ta\t"a[2] > FORWARD + else + print $2"\t\ta\t"a[2] > FORWARD + print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE +} +END { + system("echo killall -HUP named"); +} + |