Lion - Time Machine issues with an old NAS

Anyone who's using Lion with Time Machine and has an old NAS as a backup destination will have come across the issue with AFP using a new authentication protocol which probably isn't supported by the NAS.

(I have a not so old Buffalo Linkstation (LS-CH1.OLT) that still didn't work after updating to the latest firmware)

Anyway, I spent ages trying to get it to work until I came across this script which I'm re-posting as it was hard to find:

Basically, it hacks Lion to trick the new protocol into communicating with your old NAS.

More importantly, unlike the other workarounds I works!

God Bless America Trailer

Loveless, jobless and possibly terminally ill, Frank has had enough of the downward spiral of America. With nothing left to lose, Frank takes his gun and decides to off the stupidest, cruelest and most repellent members of society with an unusual accomplice: 16-year-old Roxy, who shares his sense of rage and disenfranchisement. From stand-up comedian and director Bobcat Goldthwait comes a scathing and hilarious attack on all that is sacred in the United States of America.