[Samba] Using smbmount in a script - no return value

Mathew D. Watson
Sat, 17 Dec 2005 17:53:36 -0000

I'm trying to periodically mount an XP share on my linux box, and I've
noticed that smbmount doesn't return a value so I can't test for success
in my shell script:

#!/bin/bash
smbmount //NonsenseShare /bad/mnt/point || echo "error with smbmount"

In this case smbmount silently fails.

I searched the archives and found a couple of messages about smbmount
demonizing before leaving a return value. Is there a good way to test
for the success or failure of smbmount?

Mat