#!/bin/sh # $Id: osx-disable-automount,v 1.2 2011/08/05 23:35:09 friedman Exp $ darwinver=`uname -r | sed 's/^\([0-9]*\)\..*/\1/'` sll=/System/Library/LaunchDaemons launchctl unload -w $sll/com.apple.autofsd.plist launchctl unload -w $sll/com.apple.automountd.plist plist=/Library/LaunchDaemons/local.mount_nfs defaults write $plist Label -string local.mount_nfs defaults write $plist ProgramArguments -array mount -avt nfs defaults write $plist RunAtLoad -bool TRUE if [ $darwinver -ge 10 ]; then # This job may not always work the first time on snow leopard if it's run # before com.apple.mDNSResponder is started. defaults write $plist KeepAlive -dict SuccessfulExit -bool false fi plutil -convert xml1 $plist.plist launchctl load -w $plist.plist # eof