EGOPOLY

Topics include: programming, Apple, Unix, gadgets, large-scale web sites and other nerdy stuff.

How to mount AFP shares from a NAS on boot.

2008-02-02 20:38:15

I finally went ahead and bought a NetGear ReadyNAS file server appliance. The thing is pretty sweet. I use it for some backups, but I also want to use it as the primary storage place for some of my larger file collections, like music or home movies.

The problem is that connecting AFS file shares via the finder doesn't seem very reliable; they don't always reconnect, and they are given stupid names by default.

So I added this line to my startup script:

    su billo -c 'mount_afp afp://billo:passwd@fs/billo /u/billo'

This mounts the share called "billo" from the ReadyNAS in a consistent location on my mac. Then I make symbolic links from my home directory (/Users/billo/Movies for example) to the directories in /u/billo/ (like /u/billo/Movies).

Hopefully this works.