söndag 19 oktober 2014

I have an MacBook Air that I need to have NFS mount working on.

This is how I have done it using LoginHooks. Every time I login to my account as script will be run and mount my NFS share to /Volumes/tank.
The text below is a direct copy/paste from a user 'slhck' on Superuser.com forum

Apples manual for executing scripts on login and logout

First, create the script you want to run. Open up a Terminal and enter:
touch ~/script.sh
open -e !$

This will open a text editor. Enter the script, e.g. with the following contents:
#!/bin/sh
# insert your script here
Save the file. In your terminal, run:
chmod +x ~/script.sh
This will make the file executable. Now, let's add it as a hook:
sudo defaults write com.apple.loginwindow LoginHook ~/script.sh
There's also the Logout Hook counterpart:
sudo defaults write com.apple.loginwindow LogoutHook ~/script.sh
I´m using it in Mavericks. Keep in mind that the script runs as root and there is only one hook for login and logout respectively.
To undo all that, enter
sudo defaults delete com.apple.loginwindow LoginHook
sudo defaults delete com.apple.loginwindow LogoutHook
Note that this method is not recommended for deployment or anything, but if you're only using it like your question stated, that should be no problem.