Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

smb_mount fails when run through launchd

I'm stumped. I have a script that I run hourly through launchd that makes sure my Mac is connected to the network shares it requires. It's a perl script and it iterates through an array of server and shares to make sure it's connected. For each, it calls the shell using mount_smbfs.

Here's the code that connects:

*print "Attempting to connect to \"$shareName\" on \"$serverName\".\n";*
*`mkdir '/Volumes/$shareName'`;*
*`mount_smbfs //$serverName/$shareName '/Volumes/$shareName'`;*

When I run this script from the command line, it works flawlessly, every time. When I run the same script through launchd, any shares that are disconnected produce this kind of error in the system log:

*smb_mount: open session failed!: syserr = Broken pipe*
*mount_smbfs: mount error: /Volumes/production: Broken pipe*

The weird thing is that I have this same script set up in launchd to run when I log in and it works at log in. It's the hourly attempts that fail. I've checked and they are the exact same command for each.

Any ideas?

Message was edited by: Rick Anderson

Message was edited by: Rick Anderson

Mac OS X (10.5.8)

Posted on Aug 25, 2009 1:16 PM

Reply

There are no replies.

smb_mount fails when run through launchd

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.