smb share auto mount problem on mac os x 10.8.0

Joined
Aug 1, 2011
Messages
1
Reaction score
0
Points
1
Hi All,
I have a requirement to auto mount a smb share on the mac machine (osx 10.8.0) during startup at /Library/StartupItems/smbmount . whwre smbmount is my new directory. which contains 2 files StartupParameters.plist and smbmount.

StartupParameters.plist

{
Description = "smbmount";
Provides = ("smbmount");
Requires = ("Network");
OrderPreference = "Late";
Messages = { start = "Starting smbmount"; stop = "Stopping smbmount"; };
}

and smbmount is as below

#!/bin/sh

##
# buffy local stuff
##

. /etc/rc.common

StartService ()
{
ConsoleMessage "smbmount startup"
# this is some weird stuff that only i'm interested in
# but I'm sure you have similar weird stuff
/sbin/mount_smbfs -N //Username:'Pass-wd'@server.bc.com/builds /Volumes/Buildarchive

}

StopService ()
{
ConsoleMessage "smbmount shutdown"
umount /Volumes/Buildarchive
}

RestartService ()
{
StopService
StartService
}

RunService "$1"

This doesn't mount the smb share. The error seen in /var/log/system.log is "no route to host "

But this script works if i run it as
SystemStarter start smbmount

Could this be because network is not available when this script is run (during start up)? If so what is the other way of auto mounting this smb share? Kindly provide all minute details... as i am new to mac.

Thanks and best regards
Vijaya Nataraj
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top