summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian-stable/wins2dns.awk
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2004-05-14 12:44:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:35 -0500
commit658d069b167a3dc946f3981d57ffe6f8defeb11a (patch)
treee1e6819d09256eae58cda05a7c4866479813f0bd /packaging/Debian/debian-stable/wins2dns.awk
parentc32c36d96f3a7863ab8514456e8a0eb9e4839264 (diff)
downloadsamba-658d069b167a3dc946f3981d57ffe6f8defeb11a.tar.gz
samba-658d069b167a3dc946f3981d57ffe6f8defeb11a.tar.bz2
samba-658d069b167a3dc946f3981d57ffe6f8defeb11a.zip
r731: add the current debian directory for debian stable (woody) targeted releases
(This used to be commit 4b9f891319fad31eb0494ab57d186568f35443ba)
Diffstat (limited to 'packaging/Debian/debian-stable/wins2dns.awk')
-rw-r--r--packaging/Debian/debian-stable/wins2dns.awk38
1 files changed, 38 insertions, 0 deletions
diff --git a/packaging/Debian/debian-stable/wins2dns.awk b/packaging/Debian/debian-stable/wins2dns.awk
new file mode 100644
index 0000000000..176868a115
--- /dev/null
+++ b/packaging/Debian/debian-stable/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");
+}
+