]> granicus.if.org Git - pdns/commitdiff
make builds semi-static, plus improve powerdns-example-script in an important way
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 21 Jun 2008 21:37:07 +0000 (21:37 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 21 Jun 2008 21:37:07 +0000 (21:37 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1213 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/build-recursor
pdns/powerdns-example-script.lua

index ca8ebffb9fc8147438cb43d3c6d5d4a5d323bf77..9039bdb40806d692a474a8c1041a2f0f4271b191 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 cd pdns-recursor-$1
 dh_make -e bert.hubert@netherlabs.nl -b  -f ../pdns-recursor-$1.tar.bz2  < /dev/null
+export LUA=1
+export STATIC=semi
 fakeroot debian/rules binary
 fakeroot rpmbuild -bb ../pdns-recursor.spec
  
\ No newline at end of file
index 8599ca4dfa3bef8e17bda2ead906ca61e2737895..98788f4d099ea84eb3d8677a0ad58c8ab4f02559 100644 (file)
@@ -1,11 +1,10 @@
 function preresolve ( ip, domain, qtype )
        print ("prequery handler called for: ", ip, domain, qtype)
 
-       if domain == "www.ds9c.nl." 
+       if domain == "www.powerdns.org." 
        then
                ret={}
-               ret[1]= {qtype=pdns.A, content="9.8.7.6", ttl=3601}
-               ret[2]= {qtype=pdns.A, content="1.2.3.4", ttl=3601}
+               ret[1]= {qtype=pdns.A, content="85.17.219.141", ttl=86400}
                print "dealing!"
                return 0, ret
        elseif domain == "www.baddomain.com."
@@ -31,7 +30,7 @@ function nxdomain ( ip, domain, qtype )
        if qtype ~= pdns.A then return -1, {} end  --  only A records
        if not string.find(domain, "^www.") then return -1, {} end  -- only things that start with www.
        
-       if matchnetmask(ip, "10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12", "::/0")
+       if matchnetmask(ip, {"127.0.0.1/32", "10.1.0.0/16"}) -- , "192.168.0.0/16", "172.16.0.0/12", "::/0")
        then 
                print "dealing"
                ret={}