Search Again:

Re: QuickDNS Scripting Woes

From: Phillip D Sanders
Date: Friday, January 21, 2000
Time: 2:11:00 am

On Thu, Jan 20, 2000, QuickDNS Talk <quickdns-talk@lists.menandmice.com>
spaketh thusly:

>Subject: Re: QuickDNS Scripting Woes
>From: "Men & Mice Support" <cbuxton@menandmice.com>
>Date: Wed, 19 Jan 2000 23:34:55 -0800
>
>At 11:51 PM -0500 1/19/2000, Phillip D Sanders wrote:
>>I exported the secondary domains (included script failed - had to roll my
>>own...)
>
>Correct, the export script wasn't designed to work with the Secondary
>Domains file.
>
>>I then had to import them in alphabetical order (another applescript)
>
>How exactly did you alphabetize them? Presumably, you determined your
>import order _before_ trying to add the records to the Secondary
>Domains file.
>
>>At first it maintained my 0-9, A-Z order, then it mysteriously swapped to
>>Z-A,9-0 order!!!
>
>Sounds like either your sorting algorithm got munged, or you weren't
>telling QuickDNS Pro Admin _where_ in the file to create the new
>record - each "make new record" statement should include the phrase
>"at the end of theFile", or some such.

Nope - I traced the problem more thoroughly after my post...

1) I ordered the records into a flat file
2) I inserted the records in order - they were perfect
3) I saved the file - remained ordered on re-opening
4) After much wailing and gnashing of teeth, I discovered that it's very
regular...
Whenever I add a domain(s) and save the file, it flops the order

5) So finally, about 4am I had abstracted my code enough to make it handle
either order and it's workable, BUT...
I have to re-index each time it runs and that's 75% of the execution time...

I had initially designed the script to MAINTAIN an index so it would be
faster.
Obviously that doesn't work with the flopping sort order...

>>I'm worried now that it's going to do worse than reverse the sort by
>>domain, to start sorting by IP or some other insane criteria.
>>


Chris, I'll send you the script off-list.




~Phi

=============================
Phillip D Sanders

PagePlanet / PagePlop

Phone: (919) 233-6602

Email: phillip@pageplanet.com



Messages In This Thread:



Return to Digital Point Solutions' Home Page