DTEXT ======= dtext is a text mode client for accessing a powerdnsapi server. The powerdnsapi server is an interface against a PowerDNS database backend, over XMLRPC. It has a subversion (svn) alike command set, and "checks out" your zone data into Bind (alike) zone files. This software REQUIRES a POWERDNSAPI SERVER to work! See http://powerdnsapi.sf.net/ . Installation ------------ Put the dtext script into $PATH. cp dtext /usr/local/bin/ chmod 0755 /usr/local/bin/dtext Change to your ordinary user. dtext --help To check out a copy from your powerdnsapi server: dtext checkout http://your-server.com/powerdnsapi.cgi dtext will the create a zone file for each zone available for it on the server. Example zone file: """ lkarsten@affor:~/dns> less servicecheck.local # HEADER-LINE-DO-NOT-EDIT-303205303206303230 2007090501 2 1871907106 193877c2r26c73 600 NS ns1.foo.com 193878c2r19c09 600 NS ns2.foo.com foo 9c2r09c41 600 TXT zone for service monitoring foo 10c2r92c65 600 A 1.2.3.4 """ Each line is similar to the Bind zone format. The main differences: * comments start with # instead of ;. * the header line must never be touched. * instead of IN there is a field consisting of PowerDNS' record id, domain_id and two checksums used to see if a line has been changed or not. New lines can be added with a checksum of "-". To commit your changes back into the database: dtext diff # see what dtext think is changed in the file. dtext commit # commit these changes. Next time you should run ''dtext update'' before doing any changes, to synchronize the files on disk with the ones in the database. $GENERATE support ----------------- Bind style $GENERATE is also supported. Format when adding a new $GENERATE record: $GEN;lower-upper;fillchar;length;NAME - ttl type content Example: $GEN;9-100;0;3;dhcp-$ - 600 A 1.2.3.$ This line will create the following records in SQL: dhcp-009.servicecheck.local 600 A 1.2.3.9 dhcp-010.servicecheck.local 600 A 1.2.3.10 dhcp-011.servicecheck.local 600 A 1.2.3.11 .. dhcp-100.servicecheck.local 600 A 1.2.3.100 The $ is expanded into 9, which is leftfilled with fillchars '0' until it is 3 chars wide.