How to reliably mount a shared folder /volume/folder at boot up
Posted
by
Tanmay
on Super User
See other posts from Super User
or by Tanmay
Published on 2012-10-11T09:28:32Z
Indexed on
2012/10/11
15:39 UTC
Read the original article
Hit count: 184
Following is my sample.sh in /usr/local/bin/
#!/bin/sh
mkdir -p /Volumes/folder
mount -t afp -o rw afp://user:password@server_name/folder_name /Volumes/folder
Following is my com.apple.sample.plist in /Library/LaunchAgents/
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.sample</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/sample.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Where as when I am able to run sample.sh independently and is working fine.
Also I have tried using launchd.conf as
mkdir -p /Volumes/folder
mount -t afp -o rw afp://user:[email protected]/testsuites /Volumes/folder
Still not working.
© Super User or respective owner