After installing Lion, I could no longer connect to my OpenSolaris NAS via AFP (to the netatalk daemon running on my NAS).

Fortunately, other people have gone before me and already solved this problem. I needed a newer version of netatalk (version 2.2.0 at the current time). I found a great guide that gives step-by-step instructions for downloading and compiling the dependencies here.

I had a couple of issues with it though.  Firstly, I had been getting this error message when running the configure script for netatalk before following that guide I linked above:
configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config.

I thought that the dependencies listed in the guide would solve that issue, especially since they included the download, compile and install of pkg-config.  Alas, the configure script for netatalk was still unable to find pkg-config after installing it.  So I just added an environment variable to the full path as suggested:
export PKG_CONFIG=/usr/local/bin/pkg-config

Finally, when I thought I was done, I restarted netatalk and connected my MBP running Snow Leopard to the NAS, only to be greeted with an unusal message – “Something wrong with the volume’s CNID DB, using temporary CNID DB instead. Check server messages for details!”  Luckily other people have also experienced this error, and it was quickly traced to the /usr/local/etc/netatalk/AppleVolumes.default file containing the configuration cnidscheme:cdb instead of cnidscheme:dbd for each of my shares.